Sky exposure is the one number every system reads
The design bible starts from a single rule: light is measured, not assigned. The city is split into four strata by height: the Sump (flooded streets under the decks, below 5% sky), the Street, the Deck and the Crown (above 80%). A native C++ field in a GDExtension casts 16 directions out to 240 m from each cell of a 640 by 640 grid and adds up how much of the sky hemisphere is not blocked by the decks, viaducts and towers above. It runs on up to four threads at half resolution and is interpolated back up.
Everything else is a formula on top. Wealth is exposure to the power 0.7, divided by one plus the transit distance to the Crown in 600 m hops. Crime is (1 minus exposure), times the distance to the nearest police post up to 700 m, times a gang border weight. Gang territory is a flood fill over the street graph from each gang's origin, weighted by culture affinity, and conflict between two gangs scales with their shared border and the gap in their wealth. None of these fields is painted. Change the city plan and the poor neighbourhood moves with the shade.
The rules show up as things you can touch
A design pillar is only useful if the player can feel it, so each field drives something visible. The Sump exists wherever a deck or viaduct covers the street for more than 40 m, and the generator links it back up with stairs every 120 m, ladders every 60 m and grates every 24 m that let rain and light fall through. Crowd archetypes and density reweight by stratum. Car security follows it too: Sump junkers are open, Street cars need a held break-in with a chance of an alarm, Deck and Crown cars need the hacking tool, and a Crown alarm always trips and reports at once.
People are a population, not spawns. About 400,000 residents each have a home, a job, a schedule, a bank balance and contacts, all generated from the city seed and their id when needed. Only the player's changes are saved. Hack a stranger on the street and the data is real: follow them and they walk home to the apartment it names. Districts are data too: five culture profiles (Little Kowloon, Hudson Grid, Lilong Quarter, Little Napoli, Lujiazui Crown) set building grammar, signage scripts, shop mix and the gangs that hold them.

A frame budget written before the features
PERF.md was written before most of the game and every agent had to measure against it: 25 ms of GPU on the Intel iGPU, at most 1,200 draw calls and 24 real-time lights in the worst view, 8 ms of main-thread logic. A feature could be taken out; it could not go over budget.
The budget caught real problems. The first play test on the RTX 4050 laptop ran at about 30 fps because the medium preset rendered 85% of a 3200 by 2000 panel, 4.6 megapixels a frame against the 1.4 the budgets assumed, and FSR 2 alone cost about 11 ms. I replaced it with an automatic quality tier, a pixel cap per tier and FSR 1. The street lights flickered because the light pool re-picked its 24 lights every 0.2 s and switched them hard at the edge. A scripted 38 s walk counted 467 light pops and 301 fog-scatter pops; after fading lights by distance with hysteresis in the pick, it counted zero of each.

Decisions, and what I gave up for them
Derive the city's social map from geometry
- CHOSE
- a computed sky exposure field that wealth, crime, crowds and security read from
- OVER
- hand-drawn rich and poor zones
- WHY
- New city sections then come from data and rules, and the inequality the game is about is always physically true: the poor live where the decks block the sky.
Bake lighting at generation time
- CHOSE
- per-vertex AO and emissive bounce computed on a worker thread as each chunk is generated
- OVER
- editor lightmap bakes
- WHY
- A LightmapGI bake cost about 11 minutes and 4.7 GB per 130 m of street. That was fine for the look-dev alley and impossible for a 26 km² generated city.
Contracts and parallel worktrees
- CHOSE
- three agents at a time, each owning one area (city, vehicles, characters, systems) against CONTRACTS.md, with me integrating and holding the perf gates
- OVER
- one agent working through the whole game in order
- WHY
- The areas only meet at a few interfaces. Writing those down first let them build at the same time, and each feature had to land with a scripted test and a capture.
Timeline
- Design bible, contracts, AI material pipeline and the baked look-dev alley
- Merged the rule-based 26 km² city plan with streaming, LOD and generation-time lighting
- Merged strata: the Sump, districts as data, territory, elevators, monorail beams
- Busiest day, 370 commits: combat, cyberware movement, vehicle security by stratum, the story layer
- Frame-rate pass: automatic tier, pixel caps, FSR 1, the light pool fix
- Aureole rig: endgame flight cyberware worn as membrane wings
Sources and method
Written from the project's code, documentation and commit history, reviewed in November 2026. Business figures come from me. Clips and screenshots are labelled with where they came from; none show customer data.
GAME.mdROADMAP.mdPERF.mdCONTRACTS.mdnative/src/city_field.cppgame/scripts/city/city_strata.gdgame/scripts/systems/population.gdgame/data/cultures/git log
