Spencer Morris スペンサー・モリス← the streetLet's talk
SM05

STRATA

FEATURED · 3 MIN
Design / case study

A city where altitude decides wealth

Most open-world cities paint their rich and poor districts by hand. In STRATA, sky is the resource. The city plan measures how much sky every 8 m patch of ground can see, and wealth, crime, crowds, police response and even how hard a car is to steal all fall out of that one number. I wrote the design bible and the rules, then ran three AI agents in parallel worktrees against shared contracts while I integrated, profiled and play-tested.

DesignOpen-world vertical slice in active developmentNov 2026 to nowGame design, technical direction, integration of parallel AI agents
A narrow rain-soaked Tokyo back alley at night with red paper lanterns, vertical shop signs and wet reflections
The look-dev alley, rendered in Godot after a headless LightmapGI bake with 226 static lights (concept/baked_street_v1.png). Sign and facade textures came from the project's AI material pipeline.
commits in the first seven days (370 on the busiest day)
lines in that week: 115k of GDScript, 22k of Blender Python and a native C++ extension
residents, each regenerated on demand from (seed, id)
city generated from rules, streamed with LOD and generation-time lighting
1 STRATA

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.

2 STRATA

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.

The same alley with steam, a food cart and grey mannequins standing at planned scenario points
Alley v3 in Godot: props placed by rule (facade columns, pier roles, sidewalk occupancy) with mannequins on the scenario points NPCs later use (concept/alley_lookdev_v3_people.png).
3 STRATA

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.

A grid of game renders: rows for the Sump hall, the street, the Kowloon district, the deck, a Crown roof and an aerial view; columns for five times of day in rain
One view per stratum at five times of day in rain, from the generated city (renders/city_tod_rain_sheet.png). The Sump row stays dark at noon; the Crown row gets the daylight.
✓ Tickets

Decisions, and what I gave up for them

DECISION01

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

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

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.
⏱ Timetable

Timeline

  1. Design bible, contracts, AI material pipeline and the baked look-dev alley
  2. Merged the rule-based 26 km² city plan with streaming, LOD and generation-time lighting
  3. Merged strata: the Sump, districts as data, territory, elevators, monorail beams
  4. Busiest day, 370 commits: combat, cyberware movement, vehicle security by stratum, the story layer
  5. Frame-rate pass: automatic tier, pixel caps, FSR 1, the light pool fix
  6. Aureole rig: endgame flight cyberware worn as membrane wings
Godot 4GDScriptC++ GDExtensionBlender (headless Python)MPFB2 charactersmotion capture retargetingElevenLabs voices
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.md
  • ROADMAP.md
  • PERF.md
  • CONTRACTS.md
  • native/src/city_field.cpp
  • game/scripts/city/city_strata.gd
  • game/scripts/systems/population.gd
  • game/data/cultures/
  • git log