Scratch games making tutorial 146a

Path finder simple

In this tutorial you will create a game in which the Cat must reach rewards by running down paths which the player can change.

 

Complete these steps ..

 

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

 

 

2. You will need different path backgrounds for your game. You can start by right-clicking each of the following image files, downloading and saving them to your computer ..

path1.BMP

path2.BMP

path3.BMP

path4.BMP

Next, select the stage, switch to the backgrounds tab and then use the Import button to find and import the 4 path images you just saved ..

 

You can delete the white stage background.

 

 

3. Select the stage's Scripts tab and add these scripts to begin and end your game ..

 

 

4. Now add this script to the stage, then go into full screen (presentation mode) and test the script by clicking on the stage ..

 

 

5. Use "File>Save as" to name and save your game. Name it "Path finder simple" ..

 

 

6. The Cat will have to run down the coloured paths to reach the rewards but if it touches the black background it will return to a start point.

Our start point will be a grey square sprite. Download and save the following sprite ..

Start.sprite

Now use the "Choose new sprite from file" button under the stage to import the Start sprite into your game ..

 

 

7. Select the Start sprite and add the following scripts to set it to the middle of the stage and make sure it stays behind the Cat sprite ..

 

 

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

 

 

9. Select the cat sprite, then re-name it, and then click the "only face left-right" button ..

 

 

10. You need the Cat sprite to begin the game standing on the Start sprite, and to be really small so that it can easily run down the coloured paths. Add these scripts to it ..

 

 

11. Next, create the scripts that allow you to control the direction the Cat walks in, and to send it back to the start when the Cat touches the black of the path background images ..

 

Go full screen and then press the "B" key on your keyboard to begin the game. Change the paths by clicking on the stage and control the Cat with the arrow keys.

Press the "E" key to end your game and continue working on it.

 

 

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

 

 

13. The Cat must reach and touch Reward sprites to gain rewards.

Download and save the following sprite ..

Reward 1.sprite

Now use the "Choose new sprite from file" button under the stage to import the Reward 1 sprite into your game ..

 

 

14. Add the first scripts to the Reward sprite to set its size and hide it when the game begins ..

 

 

15. The Reward sprite has 3 simple costumes which help create a flashing effect ..

 

Add this simple script to make the Reward flash when it appears ..

 

 

16. You want the Reward sprite to appear at random positions around the stage, and at random times. Make it appear every 6 seconds and remain visible for 20 seconds so the Cat has a good chance of getting to it and touching it. Add this script..

 

Go full screen and then press the "B" key on your keyboard to test the Reward sprite.

Press the "E" key to end your game and continue working on it.

 

 

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

 

 

18. The Cat is not earning any rewards when it touches the Reward sprite, and you don't have a countdown time limit for your game. it's time to add the scripts to allow this.

Select the Variable scripts and create the following variables "for all sprites" ..

 

Arrange the variable displays on the stage like this ..

 

 

19. Select the Rewards 1 sprite and add this script ..

 

Go full screen and then press the "B" key on your keyboard to test the Reward sprite and your new variable.

Press the "E" key to end your game and continue working on it.

 

 

20. It would be better if there were two Reward sprites which appear at different times and locations on the stage.

Right-click the Reward 1 sprite under the stage and duplicate it and then re-name it "Reward 2".

 

 

21. Edit the Reward 2 sprite's scripts so it only hides for 3 seconds ..

 

 

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

 

 

23. You're nearly finished. The only remaining script is for the countdown timer. Add its script to the stage ..

 

Go full screen and then press the "B" key on your keyboard to test your game.

Press the "E" key to end your game and then use "File>Save" to re-save it ..

 

 

24. Well done, you've finished making the game! Can you improve it? How about making your own additional path backgrounds? Or adding enemy sprites which follow the Cat and steal rewards?