Cakeland – turned my kid’s drawing into an Android game

2016-01-26

Recently my 5 year old son drew a sketch of a computer game concept he had come up with. The game would be about a cake factory, and the goal simply would be to make as many delicious cakes as possible. Here is his drawing:

cake_factory

Well, looking at the drawing and the nicely laid out factory workflow, I thought, “why not turn this into an actual game?” And I did. I asked him to create additional “assets”, and he happily complied:

assets

Over the course of a couple of hours, I made a little Android game that brought my son’s vision to life. He was very excited, to say the least. He looked over my shoulder when I scanned in his drawing, dissected it into individual assets, and created the first layout. Here is what it looks like:

screenshot

Here is a video of the game play:

The objective, obviously, is to produce cakes. You click on the dough dispenser at the left, get a nice dollop of dough, add milk (from the black carton – apparently my son feels that black is the ideal milk packaging color), then pick up the dough with the kneading gear, which turns it into this nice little unbaked cake:

unbaked_cake

Next, you pick it up with the shovel and put it in the oven. After a couple of seconds (320 game loop cycles, to be precise), the cake emerges and is transported to the end of the conveyor belt. At which time you score one point. Ta-dah!

baked_cake

Notice how he tried to replicate the cake perfectly, just with a darker texture – this is all hand-drawn, no copy and paste as in a lowly animation sweatshop!

I know, this is not a game that will keep you on the edge of your seat, but my son loved it. Mostly because it was his game, but I felt there was also something else that appealed to him. The game is extremely simple, and I expected him to get bored after a couple of minutes. Quite to the contrary, he played for an hour straight and asked for more. The game in its simplicity is an almost zen-like experience, and he seemed to like this change of pace from more conventional games.

Nevertheless, this will not hit the Google play store anytime soon, as we both are realistic about its appeal (or lack thereof) to other people.

The coding itself didn’t catch my sons’s attention, of course, but he very much enjoyed the debugging – testing, seeing what works and what doesn’t, and making small adjustments. I used the very nice libgdx game engine, which allowed us to work quickly on a desktop prototype and later turn it into an Android game. Here is a snippet of the source code from Android Studio focusing on scoring – the whole thing is basically a switch statement representing a straightforward state machine:

sourcecode

Overall this was a very nice experience for both of us. We had created something tangible and – to us – entertaining together, and part of the fun was that it could be done so quickly. By keeping the gameplay extremely simple, the whole development took just a couple of hours, from start to end. Even just after about an hour my son could see a first version with already some interactivity happening.

If you know a bit about game development and have kids, I highly recommend doing something similar with your kids. And who knows, it might even get them a bit excited about STEM fields. My son surely appreciated the behind-the-scenes look at how computer games are created. And he was quite surprised “how long it takes” – and even more so when I told him that “big games” take not just a couple of hours to make, but months and years.

Comments

  1. William Torr, Reply

    I really like your game and can assure you it will help to stimulate your sons interest.
    I wrote games on an Amstrad in basic nearly 30 years ago to help my sons with schoolwork.
    They both earn their living in computing now!

    regards

    William

    1. admin, Reply

      Thanks! Ah yes, the Amstrads. I remember them well, a friend of mine had one when we were in school, and he tried to convince me to buy one, too. But alas, I didn’t have enough money then. Back in those days, it sure wasn’t common to get help with your homework from your dad using an Amstrad!

    1. admin, Reply

      Hey, thanks! I have my flaws, just as every dad, but this project sure got me brownie points from my son!

Leave a Reply

Your email address will not be published. Required fields are marked *