Scratch game making tutorial 110

Furballs

In this game you must manoeuvre 3 furball sprites to gain points whilst avoiding enemy sprites. You have two minutes to get as many points as possible.

 

1. Download, save and then add the following sprites to a new game ..

Target.sprite

Enemy 1.sprite

Furball 1.sprite

Game over.sprite

Now delete the Cat sprite.

 

2. Select the stage and paint in black. This is essential if the sprites are to be as visible as possible.

 

3. Now create these variables ("for all sprites") ..

Hide all except "Countdown" and "Points" and then position these on the edge of the stage.

 

4. Add these scripts to the stage ..

 

5. Use "File>Save as" to save your game. Name it "Furballs".

 

6. Select the "Target" sprite and add these scripts ..

 

7. Select the "Enemy 1" sprite and add these scripts ..

 

8. Duplicate "Enemy 1" twice. Re-name the duplicates "Enemy 2" and "Enemy 3". The scripts for all three enemy sprites are identical.

 

9. Use "File>Save" to re-save your game.

 

10. Select the "Furball 1" sprite and add these scripts ..

 

11. Duplicate the "Furball 1" sprite and re-name it "Furball 2". You need to change a small change to one of the scripts.

Find the script block that controls it's movement (move steps). You will see that this script moves the furball towards the mouse pointer at a speed which is taken from the distance to the mouse-pointer in pixels divided by 10. So if the sprite is 100 pixels away from the mouse pointer it will move 10 steps. If it is 40 pixels away it will move 2.5 steps. We use division to stop the furball moving too fast.

We want "Furball 2" to move a little slower than "Furball 1" so it takes a little longer to catch up with the mouse-pointer. This creates a nice animation effect. Change "distance to mouse pointer / 10" to "distance to mouse pointer / 15".

 

12. Duplicate the "Furball 1" sprite again and re-name it "Furball 3". This time Change "distance to mouse pointer / 10" to "distance to mouse pointer / 20". "Furball 3" will be the slowest furball.

You should now have ..

Furball 1 - "distance to mouse pointer / 10"

Furball 2 -"distance to mouse pointer / 15"

Furball 3 -"distance to mouse pointer / 20"

 

13. Finally, add these scripts to the "Game over" sprite ..

 

14. Use "File>Save" to re-save your game.

 

15. Well done. You've finished. Time to test your game. Can you get 300 points?

 

16. Think about how you could mod the game. How would you make it harder, or easier.