Friday, October 10, 2014

Technology and How It Is Evolving Storytelling in Our Entertainment Experiences / GHC14

What luck! An invited technical speaker at GHC wants to talk about storytelling and games! As Bonnie Ross' abstract states, "stories spill into every aspect and facet of our lives; narrative leaps between nations, and stories span devices, media and demographics. The entertainment industry stands at the crossroads of where those stories intersect, how those stories are told and who tells them."  Here is my summary of Bonnie's talk.


Recent stats: 48% of gamers are women.  But where are we on the creation side? Software is omnipresent, and it's harder to see what you can do when you finish a degree in technology.  Bonnie originally came to gaming because of technology, and wasn't planning on staying more than a year.  But she found a passion.  She hopes some of us will too.

Bonnie showed us a video prologue of the Halo story.  She asks, what tools and technology have enabled us to tell more immersive stories? Games have different genres, and different styles requiring different graphics.  Similarly, games have different needs in terms of storytelling.  Audiences are asked to have some kind of suspension of disbelief when consuming entertainment.

Technology had advanced to support this suspension disbelief in many areas, but one that has helped immensely with Halo is facial motion capture.  Golum was one of the first characters to use this, but now it's in many movies and games.  The technique leads to more believable performances, helps bridge the uncanny valley, and leads to more efficient development.  We get a stronger emotional attachment to the higher fidelity characters.

One funny thing about casting interviews for character actors: they don't tell the interviewees what they are doing, and just ask them to move their faces around in a wide range of emotions.  What they are really looking for is botox, because they need every wrinkle to move for facial motion capture to work.

Bonnie showed us several examples of various stages of animations, and I must say I am flabbergasted.

Fans are also now becoming part of the Halo story.  They've always wanted to be, but it used to be a more physical form (cosplay, for example).  Lost engaged fans through things like ARGs and really invited them into their story.  Is this a good thing? Bonnie says yes.  The more the users feel ownership in your story, the more they will stick with you.  Is there a way to bring the Halo story and the fans' story together into something bigger? Perhaps through ARGs, transmedia initiatives and the like...

Bonnie hopes we all walk away thinking about what new things we can do with technology.  That we see the balance of art and science in games.  That everyone coming out of university realized we all need some kind of technical background.  Now that's a story I can buy into!

Games to Get Girls Interested in Programming, and Animation for Music and Dance Games / GHC14

I started my last morning of GHC with two presentations in the GFX track, which covers games and graphics.  I enjoyed both talks, though the first is particularly relevant to our Gram's House project.

Image from the virtual world Shahnaz Kamberi worked on in her research.

Gamher: Creating a Game to Increase Girls' Interest in Programming
Shahnaz Kamberi

Shahnaz targeted girls aged 13-17 with a game to increase their interest in programming at a time when many lose that interest.  It's nothing new that we want girls to study STEM, but despite all the time, money and effort, we have not succeeded.  But maybe game-based learning, which has been proven effective in the past, can work here.

There are two deliverables with Shahnaz's research, which is part of her doctoral thesis project: game design elements list (aesthetics, mechanics, story, and technology) and an educational game that teaches Java programming.

The framework Shahnaz followed is known as the ADDIE model: analyze, develop, design, develop, implement, evaluate.

During analysis, she realized that she did not want to take a constructivist approach, which covers programs like Scratch and Alice.  Rather, she wanted to make an instructivist game, an area that is more lacking.  She then decided that she preferred a gender-specific game rather than a gender-neutral game, but wanted to break the stereotype of what gender-specific games look like.

To help with development, Shahnaz prototyped a 2D game in GameMaker and an exploratory 3D world using OpenSim.

To evaluate, Shahnaz compared performance between a group that used the game vs. a group that had traditional lectures with added interactivity. It turned out that the lecture group did a little better than the game group on the post-quiz.  This may have been because the facilitator was able to control the classroom's progress, whereas students playing the games may not have finished all the material. The game group has a higher positive response to computer science in the post-surveys, but there was not a significant difference.  Interestingly, story appeared in the participants' lists of worst and best things about the game.  There was a lot of positive response in terms of whether the girls would play the game again and whether it positively influenced their views of computer science.

My take: it was really nice to see how Shahnaz set up her experiment, and how she dealt with the fact that the game group did not perform better than the lecture group.  She realized that she works as a professor, and therefore is paid to teach programming.  So if girls were able to learn as much while playing a game, then indeed the game has succeeded! It did as good a job as a professional!

You can learn more about this project on Shahnaz's blog and website.

Animation Programming Techniques for Music and Dance Video Games
Jessica S. Scott

Jessica is the lead engineer at Harmonix, and has a mixed background in CS and art.  She opened with the question of why we even need character animations.  Among the usual answers was the notion of using animation as a user interface.  In games like Dance Central, animations tell the user what to do.  Then, why do you need programmers for animation? You need to get animations from a 3D program into a game, usually with requirements in terms of memory usage, performance, and response to user input.

Jessica started with some of the basics of computer representation of animation on a computer.  For skinning, they use bones that meshes can follow.  Animators can pose a skeleton of a character.  Keyframes are a way of storing animation poses at points at specific points in time, and movement in between can be interpolated.

Memory and performance issues: Animation often takes up a large percentage of a game's memory and CPU budget.  When storing animations, store rotation, position and scale for each keypoint, and use compression and blending techniques.

Game animation special needs: it's more complicated than movie animation! Players get control of characters, and real-time playback is important.  Game worlds have dynamic elements that help determine what animations to play.

More about blending: needed for the dynamic choice of animations.  Two kinds: combine multiple animations at one point in time, or over a period of time.  Blending allows for natural-looking but automatic transitions between different animations.  Blending involves a lot of interpolating, for example between rotation values between bones.

Storing animations: quaternions instead of rotation matrices since you only need 4 floats instead of 9, and blending is easier due to easier interpolation.

Inverse kinematics: modifying a character's joint positions and rotations based on physics constraints.  Mathematical calculations are applied after regular skeleton posing.  Important not to apply to only one set of bones!

Dance Central example: foot slide during blending.  Suppose you want to blend two dance moves and the foot is on the ground with weight on it.  Takes a lot of effort to get the foot to do something interesting in between.  (Showed a funny example with a really long, stretched leg.)

Beatles: Rock Band example: wanted the Beatles to lean in toward the mic during harmonies.  Seems like a good idea to just stretch the neck toward the mic, but turns out not such a good idea when the character is too far away from the mic! (Showed another funny example with one Beatle standing too far away, with a super long neck stretched to the mic.)

My take: how cool to learn a bit more about what's behind animations in my favourite games! (Dance Central and Beatles Rockband happen to both be games I've played a lot.)  The talk also makes me wish I could spend more time on computer graphics, which I have learned but never get to practice.

Wednesday, October 8, 2014

The basics of contributing to open source with GitHub / GHC14

My first session after the plenary opener was about how to use GitHub, presented by John Britton.  I was interested in getting some better insight into effective use of Git, a distributed version control system, so I could eventually move some of my own projects to my (thus far unused) GitHub account.

GitHub Office
GitHub Office / Ben Scholzen 

Although I did find the session useful, it unfortunately moved a bit too fast and with demos that were hard to make out on the big screen due to the high resolution of the image.  I tried to keep up while trying things out, but quickly found myself lost.  (Funnily enough, it was when John started demoing Git from the command line that I was really able to get a handle on things.)  I'll share some of trickier bits I was able to figure out during the session along with my own research below.

I admittedly still get confused by Git since I haven't used it for any of my own projects.  The key thing to sort out is the workflow, which is different from version control systems like CVS and SVN:
  • The first step in making changes to an existing project is to clone it.  This fetches a repository that you don't yet have locally.
  • Next, you can checkout a new branch, giving it a name and activating it (or, if the branch already exists, just switch to it).  There is some useful discussion about the difference between clone and checkout here.
  • After making some changes to files or adding new ones, you can use git status to review those changes.
  • If there's a new file that you want to be tracked by Git, you need to add it.
  • When ready, you can commit your current set of changes to the repository, creating a snapshot of sorts.
  • Finally, when you are ready to send your local snapshot to your Git repository, you push.
Another issue that confused me terribly is the idea of a pull request.  GitHub lets you "fork" somebody else's project, which basically means making a branch within your own GitHub account.  You can work on your forked project and make whatever changes you want without affecting the original owner's project or requiring their permission. Then, you can make a pull request.  The name of the action suggests to me that you are requesting to pull changes from somebody else's project, but in fact you are requesting that the owner of a project pull your changes.

If you aren't familiar with branching and merging, this article might be useful.  You might also like Code School's interactive lessons on GitHub to get a feel for the system overall.

One last thing: if you are a student, you must check out this recently announced student pack, which includes access to a free micro account on GitHub (this lets you have private repositories).  Awesome!!

Thursday, September 25, 2014

C++ and Java Together in CS2: Will it Be Great or a Disaster?

I've been trying something a little bit different for our CS2 class this semester.  The course typically covers object-oriented programming in Java along with topics like recursion.  In fact, students becoming proficient in Java is one of the hard requirements of the course.  But students who have recently passed the course did not seem sufficiently prepared for what came next: systems programming with C.  In fact, some students (barely) passing the course seemed not to be able to program sufficiently well on their own at all.

I knew there was an appetite to try something new, and I thought I had the perfect book to try out: Think Like a Programmer.  Only problem was that the book uses C++, and as I said above, we need to use Java.  I ended up chatting with a member of our curriculum committee about it, and we realized that maybe, just maybe, we could do both.  We could teach just a bit of C++ so students would understand the book, and do our major examples and assignments in Java.  So that's what I'm doing.  The question is, will it turn out well, or end in disaster?


In some ways, it seems like trying to cover two languages in a course where many students can't grasp even one is a really bad idea.  But hear me out.  I am not trying to teach them how to be proficient C++ programmers.  My goal is only to show enough C++ so that students can understand Think Like a Programmer, and even more importantly, so that I can more explicitly illustrate some key concepts in Java that are normally hidden away.

For example, C++ makes you choose whether you are passing by reference.  With some simple examples, I can illustrate the difference between pass-by-reference and pass-by-value more clearly. When we get to Java, I can easily explain what gets passed by reference automatically.  Understanding dynamic memory can also be made more explicit in C++, then applied to topics like creating linked lists in Java.  Even the fact that C++ allows me to build up to objects without needing to have a dummy class in the meantime is quite helpful.

We're only in our third full week of class so far, and we're just getting started on Java.  So I don't know yet how well this experiment will work once we have the two languages going side by side.  But I can say that it has been very beneficial to be able to approach the course using the problem-solving perspective of Think Like a Programmer and the slightly lower level view that C++ allows for things like how variables and arrays are stored in memory.  If this continues working well, I think this could be a winner.

I'll be soliciting anonymous feedback after a couple of weeks of using both languages, and hope to report back after I get some data from students.  Eventually I'll also share more details about the course design itself.

In the meantime, I wold love to hear your opinion - does this approach have potential, or do you see it as a disaster waiting to happen?

Monday, September 22, 2014

How Beyond the Code Attendees Found Their Spark with Anita's Quilt

Recently, Shopify put on a super cool conference called Beyond the Code.  Hosted at the Ottawa Convention Centre, the event's main goal was to highlight the role of women in technology.  All types of folks were there,  from devs to designers and the audience was more than half female!



I was lucky enough to run a lunchtime workshop called Find Your Spark with Anita's Quilt.  Some of my fellow Quilters developed this workshop, so I had a good base to start from.  The general layout we used was to sort people into tables as they came in (we used chocolates!), then have them introduce themselves to their table mates, pick and read a story from the Find Your Spark! page, and  talk about the stories using the discussion questions we provided them (now also on the Find Your Spark! page).  After the discussion, we had a few tables share their biggest takeaways (there wasn't enough time to go through all tables let alone all questions).

It was an enjoyable way to spend lunch and meet some new people, but the thing I was most excited for was to hear what the participants actually got out of reading the stories.  I have been working hard to curate a lot of the great content on Anita's Quilt, so of course I wanted to know whether it has been meaningful and even useful to readers.

I was really impressed with the insights that came out of the discussion.  A few key issues were brought up:
  • One group noticed the prevalence of the imposter syndrome, that feeling you get that makes you think you don't deserve to be where you are and that everybody's going to find out any day now.
  • Another group pointed out that a lot of the stories are about how somebody corrected course when their life got back on track.  Realizing this allows the reader to see how others did in case they ever face the same situation.
  • The fear of failure was a big theme.  That lead to discussion on the importance of a support network of friends, family, and mentors/sponsors that can help you lose the fear of failing.
  • The last group brought up the issue of the kind of language women tend to use, and how it often portrays less confidence, or attributes success to factors outside of their own good work.
It's almost as though we went through a checklist of common issues facing women in tech!

If all this sounds intriguing to you, or you could just use a really good story to get inspired, be sure to check out the Anita's Quilt Story Campaigns archive,  or follow the Find Your Spark! model to choose a story and think about the discussion questions.  Let me know what you get out of the stories you read!