A city kart grand prix · built from code · 17:42

SUNSETDISTRICT

Four laps on a wet downtown circuit. Five rivals. A kart you can read down to the tyre lettering. This is the record of how it was made — and the gallery of everything it does.

Method · photoreal-game skill Build · single HTML / no network Race · 4 laps / 5 rivals / 4:00 clock Verified · 31/31 playtest checks
The skill used

photoreal-gamea procedure for playable, photographic 3D from code

Everything in this build followed the photoreal-game skill: product before look; one dominant light with an environment for fill; material variation in albedo, roughness and normal; multi-scale composition; a filmic image formation chain; and executable gates instead of opinion.

The skill's order mattered. The title, race loop, settings, pause, save, touch path and failure states existed before the city was lit. Each art round changed one lever, was captured from fixed cameras, and was kept only if no gate regressed.

The subjectA wet city circuit at golden hour, with a code-built kart as the hero object.
The signature systemWet asphalt with a half-resolution planar reflection, puddles and roughness-masked Fresnel.
The verdictsProduct, mobile, census, lights, playtest and look gates — the gate wins over taste.
The constraintNo reference imagery. The look gate therefore ran in the skill's tone + emptiness fallback mode.
01 · Product

Title, race, pause, settings, save, touch, win/lose and restart are built first. A beautiful frame without a loop is a failure.

02 · Light

One shadow-casting sun down the canyon, a PMREM sky environment, a sky-tinted hemisphere and a cool bounce from the camera side.

03 · Materials

Procedural asphalt, paving, four facade styles, metal, concrete, wood, rubber, cloth and water — all with more than one varied channel.

04 · Composition

Kart, barrier, sidewalk, street wall, landmark towers and a distant skyline. Three scales and three depth layers in the hero frame.

05 · Image

HDR scene target, ACES tone mapping, bloom, FXAA, chromatic aberration, grain, vignette and a deliberate desaturation.

06 · Gates

Render, census, collision, lights, product, mobile, playtest and look. The stock walker gates were re-expressed for a barrier-lined circuit.

Every system, visible

Feature gallery

Thirteen screens from a 1600 × 900 high-quality capture session. The touch shot is 390 × 844.

SUNSET DISTRICT title screen
01 · Title / key artLive city key art, start, settings, starting grid and records. The HUD is hidden.
Start grid and city canyon
02 · Hero key artThe start grid under the gantry: player kart, five rivals, crowd, towers and wet road.
Kart close-up
03 · Kart detailFront-three-quarter at 2.6 m: open-face wheels, brake discs, engine, harness, driver and number plates.
Race HUD and pack
04 · Race HUDLap, position, race clock, speed, gear, nitro, chassis, minimap, compass and radio, with the pack ahead.
Drifting kart with tyre smoke
05 · Drift + nitroSlip-angle drift, tyre smoke, skid marks, mini-turbo, charged nitro and the coaching prompt.
Boost pad and exhaust flames
06 · Boost padPad chevrons, exhaust flame, spark spray, NITRO ENGAGED and the compass to the next pad.
Cone hazard and caution marker
07 · Cone hazardThree cone zones on the racing line, a world CAUTION marker and chassis damage on contact.
Lap banner and radio subtitle
08 · Lap + radioLap 2/4 banner, the beat dots, the P2 objective switch and a race-control subtitle.
Pause screen
09 · PauseResume, restart, settings and quit; position, lap, elapsed race time and chassis on the panel.
Settings screen
10 · SettingsSensitivity, volume, FOV, invert-Y, quality preset, mute and an erase-record action — persisted.
Time-up failure screen
11 · Time upA named failure at the real 4:00 limit: race clock expired, P6/6 and run recorded.
Podium win screen
12 · Podium winP1, race time, best lap, top speed, CITY CUP SECURED and a one-tap rematch.
Mobile touch layout
13 · Mobile touch390 × 844: steering, GAS, BRK, DRIFT, NITRO, pause, compact HUD and no horizontal overflow.
Feature contact sheet

Feature contact sheet · 13 shots · 1600 × 900 (mobile 390 × 844) · captured at a fixed seed.

The record

Six rounds

Every round was captured from a fixed camera and a fixed seed. The next change came from the lowest gate/metric, not from the most interesting idea.

00

First light

The whole pipeline existed before the art pass: an inlined Three.js, a seeded city, a spline circuit, procedural karts, a sky and a post chain. The first frame exposed gross defects: barriers rotated across the track, the hero camera inside the grandstand roof, a neon palette and a title card covering the cars.
First framed title screen
00 · first frameThe pipeline worked; the geometry did not.
01

Correct the circuit, compose the grid

The player moved to the back-right grid slot and the camera inside the barrier line. The grandstand moved off the sightline. The barriers became continuous concrete-and-steel walls. A dimensioned city fabric replaced the empty ground. Top-down check: the loop, barriers and city blocks read as a circuit rather than a prop ring.
Composition after the barrier fix
01 · compositionContinuous barriers, a readable grid and city depth.
02

Materials and colour

The 5 × 5 facade atlas gained recessed windows, sills, blinds and normal maps. The asphalt gained gutter/rut wetness and a wet roughness map. A composite desaturation brought measured colourfulness from 107.6 → 40.6 and midtones from 51.8% → 59.6%. Spectators, awnings and shop signs filled the street.
colourfulness 40.6midtones 59.6%clip 0.69/0.72
Materials and crowd pass
02 · material passThe frame stopped reading as an ungraded asset dump.
03

The signature surface

A half-resolution mirrored camera renders the city except the road. The wet asphalt samples it through a Fresnel × roughness mask, a ripple warp and a four-tap blur. This one system carried the “wet sunset street” idea into every race frame; it is the visual leap of the whole project.
planar reflectionHIGH / ULTRA only
Planar reflection on the wet road
03 · wet roadTrees, karts, buildings and sky in the asphalt.
04

Hero object, city density

The tyre cylinder was hiding the rims: the sidewalls were solid caps. Opening them exposed the rims, spokes, brake discs and lettering. A wedge nose, rear wing, number plates, harness and engine detail made the kart nameable at 2.6 m. The background gained a dense block grid, setbacks, rooftop units and two landmark towers.
Kart close-up with open wheel faces
04 · hero detailA code-kit kart made legible, tyre text included.
05

Product shell and a real loop

Title, settings, pause, save, touch, win, loss and restart; four laps with five AI rivals, drift/nitro, boost pads, cone hazards, a 4:00 clock and a health bar. The product gate caught a real defect: the pause/settings modal computed to opacity 0 because of a fade-in animation. The screens must be visible in the DOM, not only in a screenshot.
product PASS31/31 playtest
Finished title shell
05 · the shellTitle, settings, records and the grid.
06

Tone, evidence, final captures

The final pair of stills crushed blacks to 7.24% (hero) and 12.1% (close). A shadow lift, a softer vignette, more sky bounce and a tighter lit close camera moved the hero to 1.63% and the close to 2.08%; flat tiles on the close fell from 15% to 7%. Both cameras passed the fallback tone + emptiness gate.
look PASSworst close: flat 7%
Final hero frame
06 · final heroThe same camera, after the tone and material work.
“The gate is not the picture. It is the argument about the picture that survives when nobody is looking at it.”

Process note

During the shell round, a multi-file batch edit overwrote the main game module and the page went blank. The module was reconstructed from the build transcript, all 25 later patches were replayed, and every subsequent round was committed to a local checkpoint before the next edit. The record above is the real one, including that failure mode.

All frames kept

Iteration gallery

Every fixed-camera round, including the ones that were reverted. The contact sheet at the bottom is the whole build on one page.

Clean first scene
01 · first clean frameCamera and light read; geometry broken.
Practice city frame
03 · city practiceMore depth, still too plastic.
Post-facade frame
04 · facadesRelief and a darker road; saturation still high.
Sun tuning frame
07 · sun tuningReflection present, warmth pushed too far.
Dense city fabric
08 · city fabricBackground grid, billboards, more depth.
Early kart close
08 · early kart closeThe old nose blob; motivation for the kit pass.
Kart close iteration
09 · close iterationRear three-quarter, before the open wheels.
Kart close iteration
10 · close iterationLivery, wing and engine gaining legibility.
Top-down circuit and city fabric
layout · top-downCircuit, barriers and block fabric checked from above.
Final kart close
final · close camera2.6 m front three-quarter, tone lifted.
Final race HUD
final · race HUDThe complete interface at speed.
Mobile title
final · mobile title390 × 844 title and start path.
Contact sheet of the whole build

Contact sheet · 16 frames · fixed seed 20261114 · every frame generated at runtime.

Evidence, not vibes

Gates

The final build was checked with the skill's executable contracts. The stock walker/cargo gates were re-expressed for a racing circuit.

GateWhat was measuredResult
ProductTitle, race, pause, settings, lost, won, persistence, touch, 4-step objective, roles/tools, HUD, audio, two cameras; 635 draw calls / 539,243 triangles / 4 lightsPASS
Mobile390 × 844; no horizontal overflow; title usable; touch UI presentPASS
Census435 meshes / 759 instances; 0 failures; no nearby prop without identityPASS
Lights4 lights, every one anchored to a fixture (or sun/sky)PASS
Playtest31 checks: title/race, pause/settings, save, accelerate, drift/turbo, full 4-lap finish, timer fail, wreck, restart, barrier push/stop, open road31 / 31
Look (fallback)No external reference by project constraint. Hero: clip 0.01/1.63%, midtones 67.0%, flat 0%. Close: clip 0.07/2.08%, midtones 64.8%, flat 7.0%PASS
Collision (adapted)204 barrier AABBs; edge push stops at 5.10 m; road remains open forward; wall clamp while drivingPASS
OfflineNo external image/font/script requests; Three.js r169 inlined; all textures generated by canvasPASS

What is still not photoreal

  • The kart is a code-authored low-poly kit. At 2.6 m the wing, seat and arms still read as designed primitives, not a manufactured vehicle.
  • The city is box massing with a facade atlas. From above it reads as a block diagram; from the street the facades carry the scene.
  • The spectator set is intentionally minimal; the crowd is two instanced draws, not individually modelled people.
  • No external reference imagery was permitted, so the look gate is tone + emptiness, not a similarity score.
  • No mobile GPU profile was captured; the mobile preset defaults to MEDIUM and the quality selector exposes LOW–ULTRA.

What the player can do

  • Race four laps from P6 to the podium; drift for nitro, release for mini-turbo, spend it on the straights.
  • Hit six boost pads, dodge three cone zones, survive barriers and rival contact; repair at each lap.
  • Win at P1–P3, lose to the 4:00 clock, a wrecked chassis, or a P4+ finish; restart in one action.
  • Persist best lap and best finish; change sensitivity, volume, FOV, invert-Y, quality and mute.
  • Play with keyboard + mouse or touch at 390 × 844; look around with a drag.

Privacy & data

No analytics, cookies, tracking, external requests or personal data. The game stores only the best lap, best position and settings in localStorage. The screenshots were captured headlessly at a fixed seed; the names in the game are fictional. The site is static: no server, no account, no comments.

Method & materials

Credits

Method

  • photoreal-game — the procedure, the art-direction brief, the iteration loop and the acceptance gates.
  • Rendering: Three.js r169 (MIT), inlined into the single HTML; no network loader.
  • Assets: every city block, facade, road texture, kart, tree, spectator, sign, particle and sound is generated by code at load time.
  • No reference imagery was used; no external assets are requested.

License

  • Original game code and generated content: MIT. See LICENSE.
  • Three.js r169: MIT; full notice in THIRD_PARTY_NOTICES.md.
  • The site is a static folder; deploy it to any GitHub Pages branch or subfolder.