I took my family out to watch Disney’s Big Hero 6 when it came out in theaters here in Malaysia. Looking at the main character, it was obvious to see the movie was aimed at younger audiences so I didn’t really have much expectations.
Anyhow, after the show, my son Jacob was able to tell me his favourite parts in explicit detail from the characters actions to what they said. Hiro teaching BayMax how to fist bump was the funniest part for him. So when he was telling parts of the story he would say, “First, this happened, then Hiro said this, then BayMax did this…” and he would act out the story he was telling.
Just like watching a movie, game development is about telling a story. I’m not referring to the storytelling aspect of game development but the technical part of programming. When you’re just starting out programming games, without prior experience or knowledge, the task of learning the language alone is daunting. But it doesn’t have to be that way. In my game programming classes, before my students actually start learning a programming language, I need to get them to think about the logic and concepts of programming. One of the things they learn at the beginning is how to write pseudo code.
What’s pseudo code? Pseudo code uses plain language (it doesn’t have to be in English) and is structured to describe how code or algorithms work.
Here’s an example. Let’s say you need to fill a grocery bag with apples and the bag can fit a maximum of 10 apples. So you write out the entire process so it looks something like this:
- Count the apples in the bag
- As long as the bag has less than 10 apples.
- Put 1 apple into the bag.
- Repeat steps 1-3.
In reality, you could easily ask anyone to perform the above instructions and they should be able to understand and get the task done easily.
Here’s an example of how the above instructions could look like in code:
var applesInBag:int = 0;
while (applesInBag < 10)
Just like how there are different ways to instruct someone to carry out a task, there are also different ways to code. As you learn programming and gain more experience you will eventually develop your own unique style. What is crucial to becoming a great programmer is the ability to logically figure out how things will work in a detailed and organised manner. Once you gain the experience and skills to figure things out, it’s just a matter of building each game component and making sure it all works together. I know it’s easier said than done, but thats a very simple way of looking at game development.
In upcoming posts, I will be sharing with you how you can actually go about creating your first few games. I will be focusing more on using pseudo code so it’s easier to understand and applicable to any language or game maker software. As always, feel free to leave a comment or suggestion on what you’d like me to write about in the future.