Aura Underground

A street racing game that runs in the browser: 831 real Aura films, a physics engine in Rust, path-traced lighting and peer-to-peer multiplayer over WebRTC.

Aura Underground

Launch Web Experience

Aura Underground is a street racing game that runs in the browser. You pick one of eighteen cars, wrap it in any of the 831 real Aura vinyl films, choose a track on a 3D map of the city and race up to five other cars at night, in the morning or at golden hour. It's also a brand game. The film on your car is a real product, and it links straight to its page on auravinyl.com.

I wanted to see how far a browser game could go if I stopped treating "it's on the web" as an excuse. Real lighting, real physics and real multiplayer, on a phone as well as a desktop. Most of it came together in about two weeks.

The game

You land on black and white bumper-cam footage with the logo over it. Tap, and the footage tears open into the garage.

The boot film tears open into the garage

The garage is a bright white showroom, the same one Aura uses in its Explorer 4 colour visualiser. The menu runs down the left with a giant outlined word behind the car, and CUSTOMIZE takes you into the films. Every swatch is a real Aura film, and the car repaints as you move through them.

Every swatch is a real Aura film
Same film, different cars

From there you go to the map, a top-down 3D city with a pin for each race. Race now opens a lobby with up to six cars. Empty slots get AI drivers wearing real films that never clash with yours, and the host picks the time of day. Then it's a countdown, a chase cam and about five minutes of racing. Finishing a track unlocks the next one, and the map flies over to the new pin.

Map, track card, lobby
Night
Golden hour

Asset creation

Every car got its own viewer page: orbit it, steer it, set the suspension travel on each wheel and step through all eighteen.

A car viewer page with sliders for speed, steer and suspension travel
The car viewer
Every wheel of every car on one sheet
Every wheel, every car

The garage started as location and light studies before landing on the white showroom.

Concept frames of a yellow car in parking garages and ramps
Location and light studies
Concept frames of a yellow car in night workshops and under a viaduct
Night studies
The white showroom garage with a car in Midnight Purple
The showroom

The city is called Halcyon Bay. Four art directions for the map, then the final.

Four art directions for the city map
Four directions for Halcyon Bay
The final map with race pins

The ten tracks are rebuilt and relit in Blender, with AURA and WRAP RX signage and street lamps aimed at the racing line.

For the intro film, every shot starts as a frame from the game engine, becomes a keyframe, then a shot. Each round went up on its own review page.

A frame from the game engine
Engine frame
The same shot as a keyframe
Keyframe
A review page for the intro film cut
Review page
The intro film

Anvil, in Rust

The cars are driven by Anvil, my physics engine, rewritten in Rust and compiled to WebAssembly. It's about nineteen thousand lines. It runs at a fixed 120 Hz and it's deterministic, so the same seed replays a whole race bit for bit. Six cars cost about a third of a millisecond a frame.

The feel I was after: "I like the Beat That driving feel, but I don't like the physics. I want the Anvil weight." So the target was the steering and slide of my old NSX preset from Beat That, on a real Anvil body with weight, suspension, tyres and collisions. Each car's kind (sport, street or SUV) comes from its own data and scales how fast it turns in, how much it rolls and dives and how it settles, so a Hummer still feels like a Hummer and a 911 doesn't.

Nitrous

Multiplayer

Every player owns their own car. Your input goes straight into your own Anvil sim, exactly like single player, so there's never any input lag. What travels over the network is a snapshot of each car, and everything else is about making the other cars look right.

The transport. MegaSocket runs the lobby, matchmaking and signalling. Once a race starts, players connect to each other directly in a WebRTC mesh, with two data channels per peer: a fast unreliable one for car snapshots, and a reliable ordered one for race events like laps, finishes, respawns and hits. Each pair of players picks its own route down a ladder: direct peer to peer, then Cloudflare TURN over UDP, then TURN over TCP/TLS on port 443 for strict firewalls, then a relay through MegaSocket as the last resort. It steps down and back up on its own, per pair, so one bad link doesn't hurt anyone else. Voice chat rides the same mesh.

The snapshot. A car's whole state packs into 48 bytes, sent 60 times a second: race tick, sequence number, position to the millimetre, orientation as a smallest-three quaternion in 32 bits (accurate to about a quarter of a degree), linear and angular velocity, the last three ticks of input for redundancy, gear, RPM and front wheel angle for the visuals, and a small teleport counter so a respawn snaps instead of getting smoothed. Every snapshot is a full state, so a lost packet costs nothing, and anything older than what's already arrived gets dropped by sequence number. The encoder and decoder don't allocate.

One clock. Everyone runs on shared race ticks at 120 Hz. Clocks sync NTP-style against the host, keeping the lowest round-trip sample. The host broadcasts a start time three seconds out, and every countdown hits GO at the same shared moment.

Predicted, not interpolated. Most games draw other players where they were about 100 ms ago, because it's smooth. At 100 m/s that's ten metres behind where the car really is, which wrecks side-by-side racing, blocking and photo finishes. So remote cars are drawn at the estimated present: projected forward from their last snapshot with velocity and acceleration, through an adaptive jitter buffer that tracks each peer. When a new snapshot arrives, the car's velocity blends from the old projection to the new one over about a tenth of a second (projective velocity blending), so cars converge without snapping or rubber-banding. The mesh carries a small decaying offset on top, which keeps motion blur and TAA clean. With 100 ms of lag, jitter and 2% packet loss, the average position error is about five centimetres.

Contact is on. Every car you don't own exists in your physics world as a proxy body, a real dynamic body with mass that a stiff spring pulls onto its owner's predicted pose every tick. Hit one and it feels like hitting a car, not a wall. Each player resolves only their own car's response, and every contact goes out to everyone as a hit message. If a link goes stale or the round trip climbs past 250 ms, that car ghosts until it recovers.

The host runs the AI. Empty grid slots are AI drivers simulated on the host's machine and broadcast like any other remote car, with full contact. Each player is the authority on their own laps and finish, and the finish carries the exact crossing point inside the tick, so photo finishes come out right.

Effects breakdown

One frozen moment on level five at night, built up a layer at a time
Albedo only: surface colour with no light
Where it starts: surface colour only, no light

It's a hybrid renderer. Everything renders into a half-float HDR target and stays linear until the very end. Every material shades forward for the few big lights (the sun or moon with shadows, lamp heads, ambient), and also writes a small G-buffer: normal, albedo, roughness and how reflective it is. Then a deferred pass adds the local lights on top. Forward is cheap for a few big lights and deferred is cheap for hundreds of small ones, so it uses both.

The lighting is path traced. Each level gets four bakes: night, morning, afternoon and golden hour. The baker is a WebGPU path tracer running in headless Chrome, 256 paths per texel with three bounces and an exact shadow ray to every light. Night on level one is seven million texels and takes about six minutes. Then it's denoised, chart seams get stitched so they line up, and it's packed down to one byte per texel. At runtime the lightmap replaces all the diffuse light (sky, bounce, moon, lamps) while specular stays live. So the light looks path traced, but every highlight and every streak on the wet road still moves with your camera.

Baked light
+ Baked light: the path-traced night lightmap
The lightmap on its own
The lightmap on its own, exposure pulled down

Reflections come in layers. Sky first, then baked reflection probes every 25 metres along the track, stored octahedral with six blur levels, ten nearest picked each frame and biased toward the road ahead. Everything is parallax corrected against proxy boxes that hug the road edges, one per 40-metre piece. The car paint reflects a small copy of the previous frame, looked up by each panel's normal around the horizon band so the car never mirrors itself.

Wet road and reflections
+ Wet road and reflections

Hundreds of lamps cost two draw calls. Level five has six hundred street lamps. Each light is drawn as a shape, a sphere, a box or a spot cone, and every visible light of the same shape goes out in one instanced call. The CPU culls each light's bounding sphere against the frustum, and on WebGPU the scene depth is attached read-only so pixels behind a volume are thrown away before shading. Up to six lamps cast real shadows, using shadowed spotlights that hop to whichever lamps are nearest you.

Street lamps
+ Street-lamp pools
Car lights
+ Headlights, tail lights and underglow

Shadows soften like real ones. The sun or moon gets up to four 2048² cascades out to 300 metres, fitted to the depth actually on screen. The soft shadows are physically sized: the penumbra is the height above the blocker times the angle of the sun's disc, half a degree. Contact points stay sharp and shadows soften with distance. The cascades hold only the cars, and each car's shadow is cut out of the baked light underneath it.

Car shadows
+ Car shadows

Films drive the shader. Each of the 831 films is twelve numbers: finish, base colour, colour shifts, glitter, sparkle, iridescence and metallic. The finish sets roughness, colour shift is a Fresnel blend between colours, and the flakes are procedural cells sized in real millimetres on the car body, half a millimetre to two for glitter. Each flake is a tiny tilted mirror that twinkles, and neighbouring flake sizes crossfade like mip levels so none gets smaller than about a pixel and a half on screen.

The finishing passes. Motion blur is McGuire's 2013 method: find the fastest motion per tile, spread it to the neighbours, then gather along it, 32 taps on MAX. The scene renders at 77% resolution and TAA rebuilds it at full size in one compute dispatch, jittering the camera through 14 Halton positions, reprojecting history with the velocity of the closest surface and clamping it to the neighbourhood's colour range so ghosts can't survive. Then bloom, with a threshold that scales with exposure, and the colour grade.

Motion blur
+ Motion blur
Final frame
+ TAA and bloom: the finished frame
The same breakdown at golden hour, on level four

GPU-driven geometry. Every static mesh is merged into one pack per material and chopped into clusters of up to 128 triangles, each with a bounding sphere and a normal cone. For every view (the camera, each shadow cascade, each probe face) compute kernels cull the clusters and compact the visible indices, then one indirect draw per pack replays from a render bundle. The cars are merged too: each vertex carries which wheel it belongs to, and a small texture holds a transform per corner, so wheels spin and steer inside a single draw.

Optimized for mobile

The same races run on phones. Every car has an automatic four-level detail chain, budgeted by part, so paint and glass keep their shape and the wheels stay perfectly round. Quality tiers run from mobile up to MAX, and a governor watches frame times and trades effects for frame rate as it needs to.

Golden hour, with the HUD

Sound

Engine sound is granular. The recordings are cut into grains of one engine cycle each, and an audio worklet plays the grain that matches your RPM, crossfading over about two milliseconds, with pitch only bending a little either side. Holding a steady RPM never sounds like a loop. Rivals get Doppler and distance filtering. The soundtrack is eight tracks: boom-bap on the menu, then drum and bass, nu-metal and acid breaks, one per level.

Aura Underground launches on Black Friday.