Land Generator · procedural world engine
Describe a settlement in text. About 0.3 seconds later, a complete 3D world exists, composed from an existing asset catalog and scored by the engine itself.
- ~0.3 s
- per world
- 10,025
- assets placed across 10 worlds, none by hand
- 121 · 16
- rule nodes · quality metrics
- 259
- automated tests
- 25,222 → 920
- draw calls per frame after instancing
- 67
- commits, ~11,000 lines of TypeScript, all mine
- Deterministic generation pipeline: settlement brief → vector plan → grid → semantic-map parser → urban graph and lots → recipes and modules → occupancy → quality scoring.
- Declarative rule engine: urban planning and composition rules live in 121 readable config nodes, so behaviour changes by editing data, not code.
- Automated evaluation of generated output: 16 metrics (interpenetration, street-front alignment, monotony, asphalt share) score every world, so a regression shows up without opening a screenshot.
- LLM planning layer: an agent turns a sentence into a JSON node graph, validated before it runs. Provider interface over OpenRouter with a heuristic fallback, and a runner with topological execution, retries, isolated branches and live events over SSE.
- Cost control: gap analysis against the catalog and a shared library with semantic cache (trigram cosine, designed to move to pgvector), so paid generation via fal.ai only covers what is missing.
- Asset pipeline: gltf-transform optimisation to under 2 MB per GLB, AABB colliders, and an export in the format the runtime editor already reads.
TypeScript · Next.js · React Three Fiber · React Flow · gltf-transform · Vitest · OpenRouter · fal.ai · SSE
The generator runs without AI at generation time by design. The LLM and fal.ai providers are implemented; the public gallery shows the deterministic engine.