How to Program Your Own Video Game

Earlier this year, I was happy to teach a 9-week after school program at Maker Kids that gave 8 budding programmers an opportunity to build their very own video games.

There are many reasons why it's a good idea to get kids programming earlier.  It helps build their problem solving skills, they get a jump start on an increasingly technical future, and they can express their creativity in a very safe and non-messy way. (I love paint splats as much as the next person but painting with computer pixels is much easier to clean up!)

The first class focussed on what programming is and how it works. Computers are fast and efficient at doing what you tell them to do but computers can only do this if you give them very specific instructions in a way that they can understand.

To illustrate this, MakerKids Paul, was brave enough to stand in as our peanut-butter-and-jelly-making robot. Students read out some simple "computer programs" that they wrote and Paul attempted to execute or "run" the program.

As I mentioned above, computers require exact instructions to run properly and you have to tell them these instructions in an exact order. Missing a step can cause your computer program to stop working or misbehave. So if you ask the robot to spread the peanut butter on the bread before opening the jar, getting the bread out, or without specifying how much peanut butter, you get no sandwiches... or a complete mess!

Each student took a turn, learned from each others mistakes, and (after a few failed attempts) were able to successfully enjoy their robot chef's sandwich creations.

For the rest of the following weeks, students followed along with a fabulous book from No Starch Press called Super Scratch Programming Adventure! in order to learn a drag and drop software program called Scratch. By mid-way point, even the youngest child at the age of 8 finished more than a few games with some help, especially from our amazing volunteer mentors, Mike Tissenbaum and Misha Dubrovsky.

Super Scratch Programming Adventure scratch-block

For some students, they had their own game ideas, so we explored what made a game good. Some of their creations are captured in the pictures below.

IMG_1592-cropped

DSC06808-cropped

DSC06813-cropped

And as a grand finale, I invited the very creative Nadine Lessio to guest speak and she showed off her game Squiddle which uses a MaKey MaKey and a sock squid as the controller. (Yes, a squid made from a sock controlled the game!) Everyone then tried adding a MaKeyMaKey to their own games.

If you're a parent and your daughter or son is showing interest in computers or video games, try building some games together. Some advice to get started:

  • If you don't know how to program yourself, sit down once a week with a book like Super Scratch Programming Adventure! Each chapter will take under an hour (or slightly more if your child is younger) and you'll both get to learn how to program!
  • Find out what is interesting for your child. Some kids want to make games that tell a story. Some kids want to make games that are challenging for others to play. Some love the drawing aspect or recording their own sound effects. One student built a fun number-adding game in order to help her younger sister with math.
  • If you or your child gets stuck, find someone who has already solved your problem. The Scratch web site makes it very easy to upload games and there is a large community of game makers sharing their creations. Search for a similar game and download their freely available "source code" -- their program may give you a hint as to what you need to do next.
  • If you're really stuck, ask for help. There are many help topics on the Scratch web site and you can sign up to the forums to post your questions.
  • And most importantly: encourage your child to take risks and experiment! If you're in a programming environment like Scratch, no harm will be done if you drag a block to the wrong spot. The Internet and power lines will stay online despite local programming logical errors. The best way to learn programming is to guess at what something does, try it out, and then compare your expectations with the result. Then try again!

Happy coding!