Work

The Argon One-Shot: a Godot 4.7 city simulator, with a 2D browser sketch

A Godot 4.7 city simulator with procedural buildings, auto-tiling roads, power and lane traffic. The code is private; a simple browser sketch runs here.

The Argon One-Shot (also called CitySim) is a 3D city simulator I built in Godot 4.7 with the team (the AI coding agents I direct). The project's README, in a private repository, titles it The Argon One-Shot and says it was built in a single session Reported. Only the simplified browser sketch below is public.

Try the browser sketch

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, or focus the canvas to move the tile cursor with the arrow keys and press Enter or Space to build. Right-drag or use the orbit buttons to rotate the view, scroll to zoom, and use WASD to pan.

Treasury: $6,500 (+$0/tick) Pop: 420 Jobs: 325 Power: 120/250 MW Happiness: 83% Daylight cycle

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. Reported

Godot 4.7 plain-text module architecture for The Argon One-Shot main.tscn and project.godot boot scripts/city_game.gd via explicit preload() constants, which drives scripts/mesh_factory.gd for procedural 3D buildings and roads and scripts/traffic_manager.gd for right-hand lane vehicles. project.godot + main.tscn Plain-text config and root scene. preload() boot No editor pre-pass scripts/city_game.gd • 4-bit cardinal road mask • 250 MW BFS power flood-fill • Land-value & Lv. 1-3 upgrades • Treasury, HUD & day/night clock 183 MW Godot starter load scripts/mesh_factory.gd Primitive 3D meshes & shared day/night window emission material scripts/traffic_manager.gd Spawns 3D vehicles & routes right-hand lanes at intersections
All geometry, materials, utility rules, and vehicle routing are generated from plain-text Godot 4.7 scripts.
The five parts of the Godot build in detail
  1. Procedural 3D architecture in code

    Instead of relying on external 3D asset packs, scripts/mesh_factory.gd constructs 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.

  2. Auto-tiling roads, bridges, and flood-fill utilities

    scripts/city_game.gd evaluates 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 (sized above the Godot build's 183 MW initial riverside town load; the reduced browser sketch above starts at 120 MW) and propagate electricity through connected structures and roads via breadth-first search.

  3. 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.

  4. Autonomous lane traffic

    scripts/traffic_manager.gd spawns 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.

  5. Cold-checkout boot via explicit preload() constants

    Godot only indexes global class_name declarations into .godot/global_script_class_cache.cfg after an editor import pass. Wiring MeshFactory, CameraRig, and TrafficManager through explicit preload() constants and concrete static types in scripts/city_game.gd lets the 3D scene boot directly from the command line on a fresh checkout.

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.

  • Inspected source snapshot (private): repository thisisntjon/citysim at commit 9f94440, 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), and scripts/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.

I built this project with AI coding assistance. The Godot build runs on the Godot Engine (MIT licence, by Juan Linietsky, Ariel Manzur and the Godot Engine contributors). The "Auto-zone block" button places zones at random along roads with a fixed rule, not with live model inference.

Where to go next

The public Godot AI methodology repository holds the methods and checks I use for building Godot games with an AI coding assistant. The work page lists the others. If you want to talk about this build, write to me.