One File, One City: GLM-5.3 Writes a Complete Godot 4.7 Cyberpunk Driving Game

A 2,392-line GDScript file that generates a 3.6 km neon city, instanced traffic and pedestrians, weather, a cop chase — and the headless automation hooks to let the game drive and photograph itself. Every screenshot below is a real capture from that pipeline.

\1GLM-5.3 did almost all the work on this open-world cyberpunk driving simulator in Godot 4.7 — procedural 3.6 km city grid, 72 AI traffic vehicles, 72 animated pedestrians, day/night lighting, rain, a police chase, a playable-in-browser WebAssembly build, and even the initial procedural textures — and the core of it all is a single GDScript file. Gemini 3.7 Flash’s contribution: enhancing the visual look of those textures.\2
2,392
lines in one main.gd
58
functions
16
commits, all Aug 19
MIT
license

First, a fact worth pausing on: this entire game is one file. Not one repo with an engine folder, asset pipeline, and scene tree — a single main.gd of 2,392 lines containing the city, the traffic, the pedestrians, the weather, the HUD, the audio synth, and the automation hooks. Everything else in the repository is a texture, a config, or the compiled web build.

Night drive through the Neon Core district — emissive signs, wet asphalt, glowing traffic
Night, Neon Core district. Captured by the game’s own headless automation: NEON_AUTO_DRIVE=1 NEON_AUTO_QUIT=9 NEON_SCREENSHOT=... — the car drove itself here.

1. The Grid: A 3.6 km City in Constants

The city is not modeled — it is computed. The world begins life as five constants at the top of main.gd:

const CITY_GRID := 64.0
const CITY_SPAN := 3584.0
const CITY_HALF := CITY_SPAN * 0.5
const CITY_ROAD_COUNT := int(CITY_SPAN / CITY_GRID) + 1
const ROAD_HALF_WIDTH := 5.4

From those five numbers the engine derives a 3584×3584 m grid — 3.6 km on a side — cut by 57 roads into blocks that the generator fills with districts: a neon entertainment core, high-rise towers reaching 160 m, and residential outskirts with sidewalks, lamps, and trees. There are no building meshes in the repo; every facade you see at runtime is generated and instanced on the fly.

3,584 m
city span per side
64 m
block grid pitch
57
roads lacing the grid
160 m
tallest generated tower

2. Instancing Is the Whole Trick

A naive city scene with 72 traffic cars — each a multi-part vehicle with cabin, wheels, head- and tail-lights — would drown the draw calls. GLM-5.3’s solution is textbook Godot: one MultiMesh per logical layer. The variable declarations read like an inventory:

var traffic_mm: MultiMesh
var traffic_cabin_mm: MultiMesh
var traffic_front_light_mm: MultiMesh
var traffic_rear_light_mm: MultiMesh
var stripe_mm: MultiMesh
var pole_mm: MultiMesh
var pedestrian_body_mm: MultiMesh
var pedestrian_head_mm: MultiMesh
var pedestrian_leg_mm: MultiMesh
var pedestrian_arm_mm: MultiMesh

Same for the world dressing: STRIPE_COUNT := 192 lane stripes, POLE_COUNT := 128 lampposts, TREE_COUNT := 96 trees — all batched. The 72 pedestrians are assembled from separate body/head/leg/arm instance arrays, so the walk cycle animates by updating transforms per-part rather than skinning meshes.

3. Driving Feel, Not Driving Physics

The vehicle model skips a rigid-body simulation and hand-codes the feel of a car instead. The steering controller is where that philosophy is most visible:

var steer_rate := 3.6 if absf(steer_target) > absf(steer) else 6.2
# Yaw rotation with Ackermann low-speed pivot (smooth realistic arc, no sudden snap):

Steering builds up at 3.6 units/s and releases faster at 6.2 — weight transfer, progressive speed-dependent dampening, lateral tire slip with counter-steer recovery, drift on the handbrake. Speed reads out through a HUD conversion of absf(vf) * 3.6 — internal meters-per-second multiplied into km/h.

4. Rain, Clouds, Stars — and a Chase

The atmosphere is procedural too: RAIN_COUNT := 520 particles, 12 procedural clouds, 140 stars that come out at night, and day/night lighting you can flip with the L key. And because every city needs consequences: MAX_COPS := 7 pursuing units when the race goes wrong.

Daylight drive on the city outskirts — sidewalks, trees, mid-rise blocks
Daylight on the outskirts. Same headless capture pipeline, NEON_LIGHT_MODE=1.

5. The Test Hooks Nobody Ships — And That’s the Point

Here is the detail that separates an AI demo from an AI engineering artifact. Buried in main.gd is a complete automation interface:

if OS.has_environment("NEON_AUTO_QUIT"):
    auto_quit_at = OS.get_environment("NEON_AUTO_QUIT").to_float()
if OS.has_environment("NEON_SCREENSHOT"):
    screenshot_path = OS.get_environment("NEON_SCREENSHOT")
if OS.has_environment("NEON_AUTO_DRIVE"):
    debug_drive = OS.get_environment("NEON_AUTO_DRIVE") == "1"

Set NEON_AUTO_DRIVE=1 and the car drives itself. Set NEON_AUTO_QUIT=9 and the game exits after nine seconds — after saving a screenshot and printing an FPS report. The model didn’t just write a game; it wrote a game that can verify itself headlessly. Every screenshot in this article was captured that way, on a machine with no display, via xvfb-run.

The engineering lesson: a game that can drive, photograph, and benchmark itself is a game you can put in CI. That instinct — automation hooks as first-class features, not afterthoughts — is exactly what you want from a coding model.

6. Two Models, One Build — and One Did Almost All of It

Let’s be precise about the division of labor, because it matters: GLM-5.3 did almost all the work. The entire 2,392-line main.gd — procedural city generation, vehicle kinematics, Ackermann steering, traffic AI, pedestrians, weather, the cop chase, HUD, audio, the export pipeline — plus the initial procedural textures: a companion Python script (generate_realistic_textures.py) that synthesizes 2048×2048 asphalt with aggregate noise, gravel chips, tire-wear darkening in the lane centers, and a computed normal map. No photographs anywhere; the first version of every texture came from GLM-5.3’s generators.

Gemini 3.7 Flash had one focused job: enhancing the visual look of those textures. It refined the PBR parameters, normal/roughness maps, and color grading of GLM-5.3’s initial output — polish applied on top of an already-complete game, not a co-authorship of it. That’s the honest split: one model built the city and everything in it; the other made the asphalt prettier.

Night drive among the high-rise towers of downtown
Downtown at night, 22 seconds into an autonomous run. The HUD clock never lies.

7. Play It Now

The repo ships a compiled WebAssembly build, so you can drive the city in a browser tab right now:

godot-cyberpunk-neon-city

Open-world procedural driving game • Godot 4.7 • MIT license • playable web build

&play; Drive it live

Prefer the source? Clone it and open in Godot 4.7:

git clone https://github.com/romangalaxys10-spec/godot-cyberpunk-neon-city.git && cd godot-cyberpunk-neon-city && godot --path .

For the automation route we used for this article’s screenshots:

NEON_NO_AUDIO=1 NEON_AUTO_DRIVE=1 NEON_AUTO_QUIT=9 \
NEON_SCREENSHOT=shot.png xvfb-run -a godot --headless=render

8. The Score That Isn’t a Score

We don’t hand out numeric verdicts on this blog, so here is the honest one-sentence summary: a single 2,392-line GDScript file that generates a 3.6 km neon city, 72 instanced traffic cars, 72 animated pedestrians, weather, a cop chase, a synthesized soundtrack — and then ships with the hooks to drive and photograph itself. That is not a demo of what an LLM can write. That is a demonstration of how an LLM thinks about shipping.

⚡ OpenAdapter Readers get 20% off — invite code BDPBCR3R ◉ Z.ai Coding Plan Readers get 10% off — invite code R0K78RJKNW
R
Analyzed by Roman

Deep-dive architecture analysis published on claw.rommark.dev. Grounded exclusively in the public repository source code, in-engine headless captures, and the live WebAssembly build.