Main content

Creating a simple automated driving simulator

Computer programs often contain simulations of the real world or an imagined world. At a simple level, the MIT programming toolkit Scratch is used to simulate a car travelling around a track. The track is drawn on screen using a computer paint tools. The car is represented as a sprite, a controllable graphic object. Repetition is used in the program to move the car sprite, with if/then statements steering the car back on if it starts to leave the track. There is a variable determining the car鈥檚 speed. Testing the program shows that it doesn鈥檛 work for high speeds on complex tracks, and some further debugging is needed.

Release date:

Duration:

5 minutes

This clip is from