Simple Movement – To start our scratch car game I have added a link below. This starter project allows you to experience movement by selecting/clicking blocks of code.
Adding an If statement – We will be using an If statement to turn the car away from the green race barrier. Select the link below, read the instructions, test and edit the code to add an If statement to the red light on the car.
Debug and improve your game – By adding a central area to the track, the car will be able to go round and round continuously. You will see that the if statements need to be changed, yellow light touching brown and red light touching green. Run the code and think about how the game can be improved.
Testing – To improve my game I have removed the space bar block and replaced it with a green flag. I have also added point in direction (90) and a forever block round the move 10 steps. Put the blocks together and test the code, does it work? How can the game be improved?
To improve my game I am going to make my track rounder and add a speed variable for changing the speed of the car. Help with backgrounds on 06 Car games. I have added the new variable code which you will need to put together. Test the code. Starting at 5mph, test and change the code to see how fast the car can go round the track.