Hold to go
Left mouse, W, the throttle pad or a controller's right trigger. Power ramps in over a quarter of a second, so short taps feather it through a corner. The trigger is fully analog.
You hold the power. The slot does the steering. Carry speed through the bends, lift before the tail steps out, and beat the teal car over five laps.
Like the real thing, you only control the power. Racing is about judging how much speed a bend can take, and the second you can get back on the throttle.
Left mouse, W, the throttle pad or a controller's right trigger. Power ramps in over a quarter of a second, so short taps feather it through a corner. The trigger is fully analog.
The grip a bend demands rises with speed squared and with how tight it is. Near the limit the tyres squeal, the body rolls and the grip lamp glows. A controller with rumble starts to buzz.
Overdo it for a moment and the tail steps out and scrubs off speed. Stay over the limit and the guide pin pops out of the slot.
A deslot costs about two seconds while the car is lifted back into its lane. You never gain lap distance while you're off the track.
A figure-eight with a bridge, built when the page loads. Below is a real flying lap recorded from the game: the cars are where the simulation put them, frame by frame.
Gantry, pit garages and the grandstand. Lap timing starts and stops on the chequered line.
A long left that starts the climb onto the bridge. Flat if you're brave, a feather if the tail twitches.
11 cm of clearance over the lower track, then the fastest part of the lap: a downhill run at about 335 km/h scale.
Bottom of the hill. Brake hard, wait for the exit, then squeeze. Most races are won or lost here.
A medium right that dives under the bridge. A short lift, then power early.
A sweeping left then right (4 and 5). Carry speed and keep the car tidy.
A double left (6 and 7) back onto the straight. Lift early, then power out.
Press Space to cycle. Views blend over a second, or fade quickly if you turn on reduced motion.
The dashboard, map and controller are drawn pixel by pixel from the live simulation. Nothing is faked for show.
The rival doesn't cheat. It reads a speed map of its lane, brakes for corners and gets back on the power on the exit, all through the same tyres, motor and slot as you.
Low sun through sash windows lays warm bands across the flocked grass. Violet shade pools under the bridge. Lamps and pit garages glow amber. Every tree, rock, screw and coil of controller cable is generated as the page loads.
The whole game is a single HTML file: raw WebGL2 for the world, Canvas 2D for the instruments, Web Audio for the sound and the Gamepad API for controllers and rumble. Everything you see is drawn by code.
The layout is a list of straights and arcs. Their curvature is smoothed so nothing kinks, integrated into a path, and two straights are solved so the loop closes exactly. Elevation and banking get the same smoothing.
Because a figure-eight turns left as much as it turns right, the inside and outside lanes come out the same length. Each slot is its own arc-length spline.
Sunlight is worked out per pixel: each point traces toward a low sun and checks the window panes, so the warm bands on the table line up with the glazing bars. A shadow map adds long shadows, and a top-down height map pools violet shade under the bridge and the trees.
The scene renders at about 340 px tall. A post pass outlines the cars, then snaps every colour to the best pair of palette entries through a 64³ lookup table built in OKLab, and dithers between them with a 4×4 Bayer matrix.
A DC-motor torque curve, drag, slope and a grip budget boosted by the car's magnet. Brief excess becomes a tail slide that scrubs speed; sustained excess pops the guide out. The rival runs the same model with a speed map of its lane and the occasional human mistake.
Sound is synthesised too: motor whine tied to RPM, rail chatter, tyre squeal, clicks over every track joint.
| Action | Mouse & keys | Controller | Touch |
|---|---|---|---|
| Throttle | Left mouseorW↑ | RTanalog | Throttle pad |
| Brake | Right mouseorS↓ | LTanalog | Brake pad |
| Camera | Space | Y | CAM |
| Restart | R | View | R |
| Pause | Esc | Menu | II |
| Sound | M | X | Sound button |
Yes. Connect any standard gamepad and press a button. RT (R2) is an analog throttle and LT (L2) an analog brake; Y changes camera, Menu pauses, View restarts and X toggles sound. Controllers with rumble buzz as you near the grip limit and jolt when you deslot.
Yes. Big throttle and brake pads appear on touch screens, and you can hold both at once. Landscape is best.
Sound starts off and only begins after you press M or the sound button. It also pauses whenever the game or the tab does.
A lap with no deslot. Your best one is kept in your browser's local storage. If storage is blocked, the game still works and just forgets it later.
It needs WebGL2, which modern browsers have. If frames get slow it drops its internal resolution on its own.
Yes, all of it, in one file. It's on GitHub.