Game making tutorial 73

Rally car race

In this tutorial you will create a game in which you must drive a car against the clock (a countdown) around a track.

Complete these steps ..

1. Create a new game file.

2. Delete the cat sprite1.


3. Click on the stage and create a race track. Don't make the race track to thin and make sure the background is one single continuous colour like this ..

4. Create these variables (for all sprites) ..

Untick the 'car speed' variable to stop it showing on the stage.


5. Add these scripts to the stage ..


6. Use File>Save as to save your game. Name it "Rally car race".


7. Download, save and import this image into the game as a new sprite ("choose new sprite from file" button under the stage) ..

Name it "car".


8. Paint a finish line sprite and name it "Finish line" ..

Place your finish line on the track.


9. Add these scripts to your finish line ..


10. Use File>Save to re-save your game.


11. Paint an oil slick and name the sprite "oil 1" ..

Add this script to it ..

You may need to add a "set size to" script block above the "forever" to re-size it and get it to fit on the road.


12. Duplicate "oil 1" and name the duplicate "oil 2".

Place them both on the tracks on the stage ..

These oil slicks will appear randomly and cause the car to skid.


13. Add these scripts to the car ..

Edit the "go to x: y:" script to place your car to the right of the start line.


14. Re-save your game.


15. Paint a new sprite with some 36pt red text which reads ..

Re-name it "start text" and add this script to it ..

16. Re-save your game. You're done! Press "B" to test your game.