External Exam Download Resources Web Applications Games Recycle Bin

Cars

SpriteImages
sprCar
Start by fixing the origin to between the back wheels, with the car facing right which is the default direction in GameMaker (default direction '0' means right).

Cars steer with their front wheels - so change the origin after you've tried it between the back wheels to the front, to see how this impacts on steering.


ObjectSpriteProperties
objCarsprCarVisible

room layout:

objCarCreate event

objCarKey Down → Up event

objCarKey Down → Right event

objCarKey Down → Left event

extension activities:

  1. change the origin (rotation point) to between the front 2 wheels. does this feel easier to steer / control and less like a shopping trolley? test.
  2. Add reverse (attach your code to a Key Down → Down event)
  3. Add a boost button (like a NOS button) that gives me a sudden burst of speed (put it on a Key Press → Letters → N event)
  4. Add a handbrake. Note - handbrakes aren't an 'instant' stop: