13 minutes
The Player Car
The interceptor sits on the road like a picture of a car. Press W and nothing happens. And a car is not a walking character: press left on a walker and it steps left, but press left in a car and only the nose turns.
Nose and momentum
Turn the wheel and the nose turns. The momentum does not. The car keeps going the way it was going, and the tyres drag it round to the new nose. While they work, the nose and the travel point different ways. That gap is a slide.
So every frame, the game splits the car's velocity (its speed and direction together) in two: the part along the nose, and the part sideways. The pedals work on the first part. Grip works on the second, and all it can do is shrink it:

dt is the seconds since the last frame, about 0.017 at 60 frames a second. grip is the share of the slide the tyres scrub off every tenth of a second. Start with a 10 m/s slide and wait 0.1 s:
Continue reading
Unlock the Full Course
Every lesson, the runnable examples, and the finished build — yours to keep.