Friday, January 2, 2015

On Completing a PhD Proposal

In Mid-December, my PhD thesis proposal was accepted, leaving me ABD ("all but dissertation"). It was quite the journey to get there, and I have some hopefully useful insights to share from the experience.


if you've ever wondered... / toby


If you're curious, much of the information about the doctoral proposal for our School is likely widely applicable. We are supposed to finish the proposal within 6 terms of registration, but in reality that's not very common. Many students do their proposal much later in the process, after completing most of the work needed for the thesis. We tried to do my proposal a bit sooner so we could get some solid feedback earlier in the process. I'm really glad we did, but more on that later.

The Document

The first step of the proposal is to write the document. I started working on this during the summer while also developing a prototype game using my interactive storytelling framework, then part-time in the fall when I went back to teaching. However, several iterations were required, the first being on the general structure of the document. This is what we settled on in terms of chapter layout:
  • Introduction
  • Background
  • Project Goals and Design
  • Work Completed
  • Future Work Plan
  • Conclusion

I put most of my effort into the second and third chapters. The background is where you have to not only show that you have a good grasp on what's out there, but also clearly show the gaps you are trying to fill. I used the Project Goals chapter to really spell out what I was trying to accomplish, and describe the storytelling framework we had published at Foundations of Digital Games.

Both of these chapters needed multiple iterations even after I fixed the overall structure of the document. We tried to bring them as close to final thesis-level quality as we could in the time we had, hoping we could reuse a lot of it again later. This is what I spent most of the fall doing.

My process for the background section is interesting to look back on: although I knew from the beginning what the text in that chapter had to accomplish, it still took me three to four iterations to get there. I fixed one problem each iteration. First, I improved the organization of the chapter so each major section had a clear organizing principle. Then I analyzed the literature more critically, then more effectively highlighted the gaps. I reorganized the sections again, and finally added better conclusions to tie up each section. The final product actually ended up being decent!

In some ways I would have liked to spend more time on the document. I noticed a few too many problems when re-reading it a few weeks after giving it to the proposal committee. For example, I cut back my introduction just before submitting, and later I realized just how... bad it was. But, to be honest, the end result — passing the proposal — would not have changed. Sometimes you have to know when to stop, even if that reason is that you simply can't spend any more time on it.

The Oral Examination

Three weeks after submitting the document to the committee, we had our proposal examination. It started with me giving a 15-20 minute talk, followed by two rounds of questions from the committee.

When preparing for the talk, I re-used a technique that helped me with a past conference presentation: I wrote a script to figure out what I wanted to say. After some feedback from my supervisor on that, , I ended up iterating on that, too.  I ended up finishing my slides a little too close to the actual presentation time. I had originally hoped to run through the talk at home at least a few times (once with my husband), as well as take notes about my background section and key project information so I would be really well prepared for questions. I did none of that. Although I still passed, I think those with some more time might really benefit from trying these ideas.

These are the slides from my talk, which give a decent enough idea of how I structured it in the end. As you can see, I centred the organization around the proposed contributions of the thesis.



Because of my lack of planned practice, I ended up being pretty nervous for the talk, and it showed.  Which is a shame, because I'm generally pretty good at presentations and keeping nerves in check.  But I guess it turned out well anyway, since some of the committee understood what I was trying to do better after the presentation.

The question portion of the exam was... interesting.  I feel like I was barely asked any questions at all.  I mostly got feedback about the proposal document (lots of constructive criticism!) and suggestions for where to go from here.  The committee suggested some ways to narrow the scope of our work and suggested ways to avoid having to make an entire game to test our designs.  This was incredibly relieving! Nothing I've done so far has been wasted effort, and future plans now look more achievable somehow.  The plan is to meet back up with the committee in six months to go over an updated plan since things are likely to change enough that we don't yet know what the final thesis will look like.

Based on this outcome, I am very glad we did an "early" proposal.  I highly recommend biting the bullet and proposing your thesis as early as you can.  Your supervisor should know if you've got enough to pass.  Get valuable feedback early and perhaps even save yourself some work, as happened in my case.

Tuesday, December 9, 2014

An Update on Our CS2 Experiment with C++ and Java

Back in September, I reported on an experimental course design I was trying out for our CS2 class.  The main idea was to start with C++ and slowly transition to Java so that we could use the explicit nature of C++ to better understand what Java is doing behind the scenes.  I wondered, will it work? Or will it be a disaster?


Danger, unexploded bomb


Before reading on, you may want to go read about the course design.  In particular, have a look at the progression of topics at the end (my lecture slides are attached as well, if you're interested).

After introducing problem solving strategies that I wanted students to use throughout the course, I started with C++ basics.  I began talking about how simple data appeared in memory.  The next topic, solving problems with arrays, allowed me to build on both the problem solving strategies and the memory model.  Once we introduced classes, I brought Java into the mix.  Then we covered dynamic memory in C++ and compared that with Java's memory model.  We talked about linked lists and a branching story app in Java to get used to programs with more complex reference structures.  At this point, we were able to leave C++ behind and move on to more advanced OOP with Java.  Later I showed them how to use the Processing library in Java to make a program where you could "see" polymorphism at play with various related objects on the screen.  I also showed how to set up a simple model-view-controller design with Processing.  Finally, we covered recursion with a focus on recursive data structures.

In the middle of the term, I conducted an informal, anonymous survey to find out how well the new design was working (or, more accurately, whether doing C++ and Java together was a bad idea).  Although the reviews were mixed, there were definitely more positive responses than I would have guessed.  It was also very interesting to learn that more students found Java more difficult than C++.

When I met with two fellow instructors and one of my TAs to decide whether we would continue this course design next term, we discussed one very promising phenomenon: students were finally asking conceptual questions instead of just syntax.  My TA had worked with this course three times in a row with three different instructors, each with a different approach.  He noted that this was the first time he had heard so many interesting, in-depth questions.  Students were talking about things like the stack and the heap for the first time, for example, even though these topics were technically covered in previous offerings.  Getting students to go beyond syntax has been one of the faculty's major goals for a while now, and it seems that we may have finally figured out how to make that happen.

Ever since the midterm survey, students have been telling me in person and over email how much they appreciate this course design.  Some tell me that they understand Java so much better than they had previously (either from taking this class before, or learning Java elsewhere).  Others tell me they have found the class interesting and useful.  One or two complained about the difficulty, but they seemed to appreciate what we were going for when we discussed it.

Of course, there are a number of students who are struggling.  But it seems these are the students who would be struggling regardless of whether we included C++.  We know this because many of these students are the ones who miss all or most lectures, who don't go to (or work during) tutorials, who don't complete assignments, and who don't come to ask for help.  These students are the ones who would be unlikely to pass even if the course was all Java.

Indeed, ensuring that only those who truly understand the material move on is another goal of the redesign.  We don't want students who have no hope of passing our systems programming class to be able to move on from this course.  An added bonus of including Java has been better assessment tools.  I've been able to ask much more pointed questions about how Java works thanks to the ability to compare to C++.  So those who pass should truly understand what we want them to.

Regardless of those who are struggling, the verdict has been clear: C++ and Java together are definitely not a disaster.  Now we shall see how the next iteration of the design fares next semester when we have quadruple the students taking the course, and even more importantly, when these students move on to second year.

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!!