🏁 Test Track — 1D Kinematics

Game mode: hit the gas, brake, throw it in reverse. The graphs log every move in real time, auto-scaling as you go.

🎮 How to play

CONTROLS
W or D accelerates S brakes (only while moving) A reverse Esc reset

With no pedal pressed: the car coasts down on its own with light friction (0.4 m/s²).

On mobile, hold the colored buttons below the canvas.

PHYSICS BEHIND THE GAME

The engine integrates dv/dt = a and ds/dt = v every frame. Accelerate applies a = +4 m/s², brake applies a = −5 m/s² opposite to velocity (won't push the car backwards once it's stopped), and reverse forces a negative acceleration. With no pedal, light friction (a = −0.4 m/s²) slows the car to a stop. Top speed: 40 m/s (≈ 144 km/h).

TEACHING TIPS

Watch the a × t graph — it shows exactly which pedal you pressed at each instant. The area under v × t is the displacement you covered over the whole session. The slope of s × t at any point is the velocity at that instant.