five-on-it / packages/catalogue/src/level-spec
packages/catalogue/src/level-spec
The level spec: a level in a few lines of JSON, what Claude writes and the generator builds (assets/blender/levels/generate.py in headless Blender, run by the worker, apps/worker, for a town; the region's solver for land). The town's schema mirrors the generator's own checks field for field (generate.py's validate and the grid-town template's in town.py): the same fields, ranges and defaults, unknown fields refused, so a spec the platform accepts is one the generator builds. catalogue.test.ts holds the two to each other.
Three templates: region (region/: land on a grid of tiles with its features, roads, water and lava, built without Blender), city (city/: a city drawn freely, its streets roads through points, solved here into a plan Blender builds) and grid-town: a town on a grid of kerbed blocks, its streets one per grid line, districts painted over the blocks with their mix of buildings (the archetypes of buildings.ts, or the OpenStreetMap-style tags they carry), their satire theme, title, density and landmarks, parks, walled compounds (compounds.py: a wall, a main gate and a guardhouse, a delivery gate, a gap, a way over the roof, cameras and guards on schedules) and street furniture. Every random choice comes from the seed.
Interfaces
Type Aliases
Variables
Functions
References
DEFAULT_MIX
Re-exports DEFAULT_MIX
HEIGHT_CLASSES
Re-exports HEIGHT_CLASSES
MAX_LANDMARKS
Re-exports MAX_LANDMARKS
PROPS
Re-exports PROPS