Scratch game making tutorial 57

Obstacle course

In this game your Cat will try to jump over walls that move towards him. If she hits a wall she will lose a life.


1. Create a new Scratch game .. File>New


2. Paint a simple grass and sky background ..


3. Now create these 4 variables (for all sprites) and untick "obstacle speed" and "y jump height" ..


4. Paint a white cloud and add these scripts to it ..


5. Save and name your game .. File>Save as


6. Paint a wall, or other obstacle that your cat must jump over. Don't forget to name it (eg "wall") ..


7. Add these scripts to the wall ..


8. Save you game .. File>Save


9. Select the cat sprite underneath the stage and rename it "Cat".


10. Go to the cat costumes tab, copy one of the costumes and edit it. This is the costume we will switch to when the cat fails to jump over the wall and loses a life ..

Name the costume "fail".


11. Add these scripts to the cat ..


12. Paint a new caption sprite like this ..


9. Add these scripts to the game over sprite ..


10. Save your game .. File>Save


11. Press the "B" key to start your game. Hit the space bar to jump over the moving walls. How long can you survive?


12. Press the "E" key to stop your game.


13. Well done. You've finished. Can you add features to the game?