Scratch game making tutorial 33

Scratch cat and code blocks video screenshot Scratch coding video lessons

Our Scratch coding online video lessons are an ideal way for your child to experience our lessons at home.
Try a FREE lesson.

Random falling balls

In this tutorial you will make a game in which the Cat must dodge falling balls.


NOTE: You can use any version of Scratch.


Complete these steps ..


1. Open Scratch, OR create a new game (from the top menu choose "File>New").



2. Now select the stage, click the "Backgrounds" tab, and then the edit button.

Use the fill / paint bucket tool to fill the stage with a dark colour of your choice.


If you are using Scratch desktop (3) click the Convert to bitmap button first ..



3. When you are done click "OK", then select the Scripts/Code tab and add this code ..



4. Paint a new sprite. You need to paint a small ball either by using the paint bush tool or by holding down shift and using the circle tool ..


When you are done, click "OK" and then re-name it "ball 1".

WARNING: If your ball is too big it will get stuck to the edge of the stage.



5. Add this code/scripts to Ball 1..

This code will make the ball go to a random X position along the top of the stage before waiting a random time and then fall.



6. Duplicate (copy) "ball 1" twice, and re-name the copies "ball 2" and "ball 3", then change their colours with the Paint bucket tool so each is a different colour.



7. Select the cat (sprite1) under the stage and rename it "Cat".



8. Add this code/scripts to the Cat ..


Press the "B" key on your keyboard to test your game.

When you are ready, press the "E" key to end your game and continue working on it.



9. Use the File menu to save your game. Name it "Random falling balls v1" ..



10. Well done, you've finished this tutorial.