Hartismere School

An outstanding coeducational secondary school and sixth form college

2. Racing game

Task 1 - Create 2 sprites: 1 for the car and 1 for the wall/barriers. There are some pre-made car sprites in the shared area (L drive, ICT, Y8, Gamemaker, cars). Set the origin of the car sprite to be the centre of the front (steering axis).

Task 2 - Create objects listed below using the sprites. Give each object the required Events and Actions. All objects should be solid.


Object

Events

Actions

Wall (set as solid)

None

None

Car

Create

Set variable speed to 0

Set variable direction to 0 

Collision with wall

Restart the game

Keyboard Press Up

Set variable speed to 1 relative

Keyboard Press Down

Set variable speed to -1 relative 

Keyboard Left

Set variable direction to 10 relative

Move Free in Direction of direction and Speed of speed

Execute code: image_angle +=10 

Keyboard Right

Set variable direction to -10 relative
Move Free in Direction of direction and Speed of speed
Execute code: image_angle -=10 


Task 3 - Create the room

Create your race track. Ensure you have a wall around the edge. Start by making a simple oval track. Start the car along the top straight of the track.

Task 4 - Test it works

If it does not, fix it!

Task 5 - Extend the game.

How could the game be extended? Moving items that decrease or increase your car health. Portals to a new track. Lap times. An extra car to make the game 2 player. What ever you want