Physics engine built on a simplified bicycle model with separate longitudinal and lateral friction coefficients. The drift state machine transitions through grip, slip, and full slide phases, each with interpolated friction values. The key innovation is a momentum-banking system - angular velocity during a slide is partially converted to linear velocity on exit, rewarding controlled oversteer.
Track generation uses a context-free grammar operating on a canvas of quadratic Bézier segments. The generator first lays a coarse path, then subdivides with constrained random perturbations. Validation checks ensure minimum turning radius, maximum banking angle, and collision-free bounds against a bounding box. The entire generation completes in under 50ms, allowing real-time preview during track selection.