This is a 2D top-down companion to the 3D Car Physics simulator. Instead of a bounding-box render, it runs a genuine nonlinear bicycle model:
- Tire slip angles: each axle's slip angle is the difference between where the tire points and where it actually travels — α_f = atan2(v + a·r, u) − δ, α_r = atan2(v − b·r, u), with u/v the forward/lateral body-frame velocity and r the yaw rate.
- Cornering force: each axle produces a lateral force proportional to its slip angle, F_y = −C·α, up to the tire's grip limit.
- Friction circle: a tire can only produce so much combined force before it slides — √(Fx² + Fy²) ≤ μ·Fz. Push both throttle and steering hard enough and the tire runs out of grip exactly like a real one.
- Weight transfer: braking and accelerating shift load between axles, ΔFz = m·a_x·h / L — heavy braking loads the front tires (more front grip, less rear) and can kick the rear out; hard acceleration does the opposite.
- Engine & gearbox: a torque curve (Nm vs RPM) is looked up from the wheel speed through the current gear ratio and final drive, with automatic up/down shifts — not just "hold gas, go faster."
Drive with W/S/A/D or the arrow keys. Brake to a stop and hold reverse to back up. Watch the grip-use bars: at 100% the tire is sliding.