oku
PCB-inspired procedural city generation — a domain-specific facade over ogun.
Named after the Yoruba concept encompassing death and the afterlife — fitting for a generator that builds cities meant to be found as ruins.
[]
= "0.2"
Quick start
use *;
let catalog = AgentCatalog ;
let spec = CitySpec ;
let city = generate;
assert!;
What it does
Oku translates urban concepts (building types, road demands, growth phases) into ogun's abstract spatial layout algorithm, then interprets the output back into city layouts. Optionally applies functional erosion to produce ruins.
Architecture
CitySpec + AgentCatalog
│
translate → ogun::Graph + Space + Config
│
ogun::generate()
│
interpret ← ogun::Layout
│
CityLayout
│
erosion (optional)
│
CityLayout (eroded)
- ogun — domain-agnostic. Nodes, edges, positions, potential functions, β.
- oku — domain-specific. Building types, road demands, growth phases, erosion, output formatting.
Key concepts
- β controls city character: low β → organic medieval, high β → planned grid
- Arrival order controls growth pattern: founding → core → growth → infill
- Erosion degrades layouts into readable ruins via cascading failure
- Hierarchical generation calls ogun at multiple scales (district → block → building)
Status
v0.2.0 — material-aware erosion, ConnectionDemand wiring, road identity tracking, ogun 0.3.0 negotiated routing. See docs/OKU_STRUCTURE.md for the full design.
License
MIT