Saturday 9 February 2013

My first Scratch game

The first game I wrote in Scratch was called Tank and was extremely simple.

I decided to take advantage of the fact that sprites could turn in any direction, and move in that direction, and could be resized.

The idea is to steer a tank to fire on targets which appear in random positions.

The game, as I said, is simple and only has 6 sprites (3 being the tank, the target, and the missile) and 22 scripts. There is a timer which counts down from 60 seconds and you can move from level 1 to 5 as your score increases (with the target getting smaller each time).

You can steer and move with the arrow keys. Late on in dveelopment I added the facility to aim the tank using the mouse (and in so doing created my first checkbox!).

There are still a couple of bugs in it (you can still control the tank even after the game is over, and the target can appear behind the variables at the top of the screen).

Even though it is simple, my kids enjoyed playing it. You can play it here.