Case study: The Argon One-Shot
The Argon One-Shot: a 3D city simulator in Godot 4.7
A Godot 4.7 city simulator with procedural buildings, auto-tiling roads, power and lane traffic. The code is private; a simplified browser sketch runs here.
Try the browser sketch
This is a simplified sketch, not the Godot build. It is 185 lines of JavaScript that draw shaded boxes on a 2D canvas with a simple perspective projection. It keeps the main ideas in reduced form: zones need power and a nearby road, parks raise land value, and powered zones grow to level 3. Power reaches anything within 11 tiles of a plant, and cars pick a random neighbouring road tile instead of following lanes. Growth and traffic use random numbers, so no two runs are the same. No AI model runs while you play.
Select a tool below, then click or drag across the grid to build. Right-drag or use the orbit buttons to rotate the view, scroll to zoom, and use WASD to pan.
Hover over any tile to inspect its terrain, building level, power connection, road access, and land value.
What changes when 3D worlds are written as plain text?
Traditional 3D game development relies heavily on manual editor work: importing binary meshes, wiring materials by hand, and configuring scene trees through inspectors. I wanted to see whether an AI coding agent could assemble a playable 3D city simulator if every scene, mesh, material, and simulation rule was expressed directly in readable code.
Choosing Godot 4.7 made that experiment practical. Because Godot stores project settings (project.godot), scenes (.tscn), and scripts (.gd) as plain text, the entire 3D application could be authored, inspected through engine logs, and launched from the command line without manual scene assembly.
How the Godot simulation works
This section describes the Godot project, not the browser sketch above.
- Procedural 3D architecture in code
Instead of relying on external 3D asset packs,
scripts/mesh_factory.gdconstructs cottages, apartment blocks, glass office towers, sawtooth factories, cooling towers, parks, and vehicles from primitive meshes and shared materials. Updating a single shared window material shifts the entire skyline from daylight reflections to warm nighttime emission. - Auto-tiling roads, bridges, and flood-fill utilities
scripts/city_game.gdevaluates a 4-bit cardinal neighbor mask whenever a road tile is placed, automatically forming intersections, sidewalks, streetlights, and elevated river bridges. Power plants supply 250 MW each and propagate electricity through connected structures and roads via breadth-first search. - Land value and three-tier building upgrades
Every simulation tick, zoned tiles check whether they have power and road access within two tiles, then compute a land value score from nearby parks, riverfront views, civic monuments, and industrial proximity. Powered zones with sufficient land value and city happiness upgrade from Level 1 to Level 3 high-rises.
- Autonomous lane traffic
scripts/traffic_manager.gdspawns 3D vehicles in proportion to road length and population, routing them along right-hand lanes and through intersections without reversing unless they reach a dead end.
What broke during the build and how the team fixed it
The team here means the AI coding agents I direct. The first desktop launch opened to a grey viewport even though the headless syntax check exited cleanly. Inspecting the Godot runtime log revealed the cause: the scripts used global class_name declarations (MeshFactory, CameraRig, TrafficManager), which Godot only indexes into .godot/global_script_class_cache.cfg after an editor import pass.
Replacing global class lookups with explicit preload() constants and concrete static types in scripts/city_game.gd allowed the project to boot directly into the 3D scene on a fresh checkout without requiring an editor pre-pass. A second adjustment increased starter power plant capacity from 150 MW to 250 MW so the initial riverside town (183 MW load) started fully powered.
What you can check
The Godot project is in a private repository, so you cannot open it or run it yourself. The descriptions of the Godot build on this page come from my inspection of that code. The browser sketch is the only part that is public.
- Inspected source snapshot (private): repository
thisisntjon/citysimat commit9f94440, inspected October 13, 2026. - Godot 4.7 modules in that snapshot:
scripts/city_game.gd(simulation loop and HUD),scripts/mesh_factory.gd(procedural 3D building and road generator), andscripts/traffic_manager.gd(lane vehicle routing). - Browser sketch on this page (public):
/citysim/citysim.js, a simplified 2D canvas version that runs locally in your browser.
Directed by Jonathan Simone with AI coding assistance. The "Auto-zone block" button places zones at random along roads with a fixed rule, not with live model inference.