Scratch Saturday: Platform Games 1
Welcome to our first lesson on how to create a platform game using Scratch. As indicated in the article last week, we’re going to be using Donkey Kong as our template. For all those waiting to dive straight into the programming, I’m afraid I have some bad news. Like every good writer, every good programmer starts with a plan and that’s where we’re going to begin.
Luckily, we don’t have to come up with an original idea for our program, because it’s already been made. We’re going to create a Scratch version of Donkey Kong’s first level, (see image below.)
As we said, while the game is quite simple, there’s a lot going on in it and that’s what we’re going to be looking at in this article. Once we have listed the different actions we need to program, we’ll start up Scratch and begin programming them in. Some of them will be really easy and others might need a bit of maths, but nothing your average 10 year old couldn’t do. In fact, if your average 10 year old can’t do it, we’ll find a way to simplify things even further where possible. OK, so what happens in Donkey Kong?
Firstly, we need Sprites. Sprites are the objects that appear on the screen so in this case, they are:
- Donkey Kong
- Burning Oil Can
- A Heart (when Mario rescues the princess)
That’s going to involve a lot of drawing! Luckily graphics weren’t that advanced in 1981 so we should make a good effort at that!
We’re also going to have to think about these sprites performing various actions. There are loads of these to consider so I’m not going to list every single one of them. Suffice to say, here is a flavour of the most important ones:
- Move left and right
- Move up and down ladders
- Jump over barrels
- Score points when jump over barrels
- Score points (and win game) when touch princess
- Die when touch barrel
- Move the barrels
- Make barrels reappear and disappear
- Make Donkey Kong die on success
- Lose lives
We’re going to start off next week with Mario and moving him around the screen. Until then, you might think about how you are going to create your Donkey Kong game. How about changing the sprites to your own characters? What’s the story of your game? Will it be the same? Will you be getting your “hero” to save a “princess” from the “villain” or will you have a twist to your tale?