February 11, 2013

Interview: How Stephane Delcroix Built a Game with His Six-Year Old Son

By

Stephane Delcroix is a software programmer based in Belgium.  He does iOS, C# and .NET contracting.  He is a Mono contributor and previously worked at Novell where he implemented Moonlight’s DeepZoom stack among other things.   You can follow Stephane on twitter, his handle is @s_delcroix
Stephane recently posted two tweets that intrigued me:

Miguel: I figured I should ask you some questions to get started, and then I will send some follow up questions. Think the story is fascinating, the ultimate bonding experience. I can not wait for my kids to be old enough to do something like this!

Stephane: You’ll decide if the story is fascinating or not. But what fascinated me was the focus and the creativity those kids are able to show. I don’t know if it’s the most binding experience I got with him so far (chainsawing some wood is quite bonding as well), but at least I wish this could be one of the childhood memories he keeps (being a father makes you think a lot about your own childhood and your parents… don’t get me started. Anyway, you know that and you’ll know even more in a few weeks). Up to now, he had a hard time trying to figure out what my job was, and even more explaining it at school. I think this will help, and I don’t mind being falsely referred as “the dad who creates games” by his friends. Coolness points+++

Miguel: You recently tweeted that you had designed a game with your 6 year old, can you tell me how did you guys decide to build a game?

Stephane: So, just like 70% of his classmates, my (soon to be) 6 year old got the flu last week. As I’m currently at home working on my own stuffs, he naturally stayed with me. He was quite sick on the 2 first days with the fever kicking, and barely managed to assemble a few lego sets while the meds were doing their stuffs. But on Thursday, he was definitely feeling better, no fever in the morning and wanted to go back to school. As he was still recovering, and we decided against that.

So when my wife left to drop #2 at school and #3 at day care, then to work, we took our breakfast. I wanted to create a game for some time, my personal todo list contains also a “push a game to the App Store” item (but not this one) to leverage the work I did on binding cocos2d and chipmunk for monotouch.

Or maybe it was the other way around? Maybe I did those bindings in order to get a game out.

I coldly dropped it : “What if we did a game. The two of us. A video game, like for iPad or iPhone?”

I had some stuff ready in my mind, like a breakout game I drafted for the (cancelled) mono room at FOSDEM. But he already had his own ideas, like if he was prepared to answer that:

Miguel: How did you design the game?

Stephane: He said “We’ll do a game with a bird. And the bird has to pop the clouds.”

As I’m used to deal with product managers I started a directed interview of what-ifs and hows: “How do we make if fly ? by tapping the screen?” “What if he falls down on the grass, cause there’s grass, right ?” “How does one win ?” “What next ?” It was still a brainstorming at that time, but the ideas were there: A bird. Has to pop the clouds by flying. When the clouds are gone, he has to reach his nest. He dies if he touches the grass. He’s knocked down if he touches the trunk of the trees and fall down of “exactly one centimetre” (his words).

Then I quickly took my morning shower and we moved upstairs to my office. The break in time and location helped switching out of brainstorming mode (kids just work like any team, they’re only more expensive).

Did I mention he acted like a PM? He did it again. He took the lead and told me “We have to write down the ideas so we don’t forget” which we did. That was a key point to success as we now got a half page with the game pitch, the edge cases, and the list of the artwork we needed to produce: Leafless trees, a bird, some grass, some clouds. And he drew them. He christened the bird Max.


Max, the birdMax the Bird
The bird has both a mouth and a beak, cause the beak can’t smile. I don’t see anything wrong with that. Do you?

Miguel: How did your kid stay engaged during the development phase?

Stephane: Basically, he does not. He can’t. That’s why the development phase has to be as short, and as sliced as possible. Here’s some recommendations I can give based on experience:

  • Cut corners
    • Don’t build a platform, build a game. Quick and dirty.
    • Don’t optimise. You don’t have time to put the artwork in a texture atlas, nor to batch the drawing. The time you spend doing that is, according to the boy, time you don’t spend working on the game (I usually manage to trick other PMs with this, but this one won’t cut me any slack at all)
    • Don’t build for cross-platform. Focus on a single device. He picked the iPad mini cause there weren’t a lot of games on that device so far. So right now the game probably doesn’t work on retina iPad, or even on iPhone. He doesn’t care, it wasn’t part of HIS requirements.
    • Keep it very simple. In our case, the GameLayer was only 150 LOC long when we called it “done” for the day. It’s now a bit more as I added some pieces afterward.
    • Don’t bother with a physics engine at this stage
  • Focus on the game.
    You don’t have time to google how to implement this, or how to do that. He sees that as slacking.
    No reddit, no mail, no message, no twitter. You have to finish the game by end-of-day.Don’t work on your platform, he does not see that as working towards the end goal. I had to extend the cocos2d bindings to accept TouchMode despite the change being only a handful of lines that was already too much.
  • Push pixels on the screen.
    Scanning, coloring, post-processing the graphics keeps him engaged. Try to split that work across the day.
    Deploy to device as soon as something change, it’s not real if it’s not deployed (does this ring a bell)

Miguel: How many times did you guys iterate over the game?

Stephane: We iterated in an Agile way. But every sprint was a single task long.

We discussed the task, I implemented it, deployed, and he tested it. I can remember of the following iterations:

  • Menu page,
  • Draw scene (trees and grass) (that one didn’t pass the acceptance test as the grass wasn’t aligned with the device),
  • Draw the bird, make it fly to the nest
  • Add the clouds (3 static clouds at hardcoded position)
  • I did an extra iteration later on adding some flapping, random clouds, multiple levels, keeping score and so on.


The Game in Action
The Game in Action

Miguel: How did cocos2d help?

Stephane: That’s a though one. Using the cocos2d binding was a choice. I don’t regret it as I don’t know XNA and this would have been a pain with plain UIViews.

Cocos2d is a great platform for 2d, and works very well with the kids and their drawings. If you use the C# bindings (shameless plug) and monotouch, you end up with a gaming platform that require very little setup, very little overhead, and every line of code written is part of the gameplay.

Up to a few days ago, it wasn’t making lot of sense to start a game on top of the cocos2d bindings for MT, as XNA is cross platform and there is a plain .NET version of cocos2d. But now, with Chipmunk bindings available (a physics engine that works with Cocos2D and MonoTouch and both Box2d and Denshion bindings coming in soon), you get a headstart when you start a game.

Miguel: What advice would you give other parent hackers on team building a game with their kids?

Stephane: I have multiples ones:

  • If you have to pick between building a game or a treehouse, go for the treehouse.
  • He or she is in charge. It’s his game, he decide, you’re just the (free) contractor.
  • Don’t aim too high. If the game is not finished in the imparted time (6 hours for a 6 y.o., but can extend to multiple days as soon as he or she starts developing (around 9 iirc)), he’ll blame you. It’s very Agile: he’s setting the priorities, you’re putting the cost. But once you committed, you have to deliver; you’re not dealing with a normal client here, you can’t afford deceiving him. If you won’t make it, tell him, reshuffle the priorities. We had to do that, cutting the levels at first.
  • Don’t do that all day. When he’s bored, it’s probably time to lunch. And then at lunch, he’ll come back with more ideas, or solutions to problems.

Miguel: What did you learn from building this game with your 6 year old?

Stephane: Doing this little project got me thinking a lot about the way we develop software or the way we do our job. My son was playing the PM and the customer roles better than real ones do. He was able to set priorities, make compromises, take decisions and he was good at that. He played the role to perfection.

And he managed to get a lot of productivity out of me. Without him, I would not have been able to get it done so fast. It reminds me a lot about the moonlight 21-days hackathon you did at the time.

Miguel: Tell me a bit about yourself, what do you do these days?

Stephane: I saw that one coming, as I look like someone who has some free time lately: I started contributing to open source projects again and I don’t mind investing a work day in building a game with my boy. And the appearances are right.

When my 3 years contract as a freelancer with a huge company ended last december, I definitely didn’t wanted to take the same kind of job. I wanted to build valuable stuffs, work on fun projects I like, and take more time with my family. The projects I’m looking for lately are the one where I can put my mobile development knowledge into action. And as everyone wants his application to be cross-platform, we have a serious headstart with Xamarin’s technologies. Things are setting up slowly but finely, and there’s some time in my agenda to grab in the coming months. Everyone’s welcome to contact me.

Miguel: Since you built this game, has your son thought of new ideas that he wants to do?

Stephane: No, not yet. It still hasn’t been a week since we finished the game. He’s currently marketing this one to his teacher and classmates, and asking me how we could distribute it. We probably won’t, except maybe a few via TestFlight. I also made it quite clear to him that it was a privilege, something very special that we did together. He’s rational enough not to beg to early. But I’m quite sure the next time he’ll be the one coming to me and asking “let’s build a game” and at that time he will probably have way more ideas than this time.

Miguel: What did he use for creating the artwork and what did you use to bring the images into the game?

Stephane: Low-tech. He sketched on paper and then outlined with a black pen (I like Pentel signpen ). Then we scanned the paper and did the colouring in The Gimp. There’s a trick I use often here. I extract the black strokes to a transparent layer and I paint in a layer below. It stays sketchy, with strong outlines. If we had to do the drawing digitally, we’d have chosen Paper (by 53). But you need to get used to it and he’s not. And there’s also some extra post processing, as the default background in Paper is greyish, and harder to filter out.

Miguel: Are his sibling interested in “hiring” you to implement their own ideas?

Stephane: Not yet, but they’re smaller. #2 is soon to be 4, and #3 is 8 month old. But at the time they’ll ask, we’ll do it. And if one asks me “let’s build a compiler”… I’ll send him at Xamarin for internship :)

TwitterFacebookGoogle+LinkedInEmail