Game guide · source of truth
Production

Environment pipeline

How the 4×4 km Amber Basin is generated and dressed — deterministic heightmap from world.json, roads and zone masks, splat materials, modular kits, vegetation, lighting per area, streaming, walkability for server + client, and tests.

The world is built from data, deterministically, so an agent can regenerate, diff and test it. world.json (zones, centres, bounds, moods) is the input. Seeded generators produce terrain, roads and masks, and hand-authored kits and set-dressing go on top.

Environment pipeline — deterministic from world.json
  1. 1Macro layout
    zones, roads, river
  2. 2Heightmap
    seeded noise + erosion
  3. 3Masks & splats
    slope/height/zone rules
  4. 4Walkability
    1 m grid shared with server
  5. 5Chunking
    256 m, 3 LODs
  6. 6Kits
    Amber Gate modular set
  7. 7Set-dressing
    rule scatter + heroes
  8. 8Vegetation
    instanced + wind
  9. 9Lighting & mood
    per-area grade
  10. 10Streaming
    2-ring prefetch
  11. 11Audio beds
    ambience per area

◆Area direction before generation

Write the area brief before the stages: combat/escape space, sightlines, landmarks, materials, lighting/fog, vegetation/life, sound, camera clearance, streaming and budgets. Version the complete seed/generator/input/override set; regeneration preserves authored landmarks. Validate movement-gem routes and both cameras as well as bot walking; inspect telegraphs on bright salt, dark ash and water at Low. New camp slope tuning is proposed in development-standards.json; it is not the world's walkability slope limit. Gameplay hazards/destruction need separate authoritative contracts before adoption.

◆Stages

#StageHow (agent)OutputTest
1Macro layouttools/world/layout.mjs reads world.json, places zone parcels, the road graph (town → 1 → … → 10, Arena spur), the river, cliffstools/world/out/layout.json + preview PNGroads connect all areas; road slope ≤ 12°; parcels don't overlap
2Heightmapseeded noise (fBm + ridged for Stormquill) + hydraulic erosion lite + carve roads/river + flatten town/arena plateaus16-bit 4097² PNGdeterminism (same seed → same hash); slope stats per zone; no spikes
3Masks & splatsrules: slope → rock, height → dunes, distance-to-water → reed/grass, zone overrides (salt, ash, kiln)4 splat layers per chunk + zone masksevery pixel's weights sum to 1; per-chunk ≤ 4 layers
4Walkability grid1 m grid from slope (≤ 38°), water depth, cliffs and blocker meshes; jump links for Cairn Vault logs/ledgesbitset + jump-link list, shared with the server (zoen-sim)bot walks town → every area; no unreachable spawn; jump links valid
5Chunking256 m chunks, LOD 129² / 65² / 33² with skirts, meshopt compressed256 chunk fileschunk size 0.5–2 MB; seams crack-free (edge test)
6Kitsmodular Amber Gate architecture (walls, gates, towers, stalls, adobe houses) from ART-ENV-054 → Blender (blockout → model → bake → LOD).glb kit piecestri/texture budgets; pivots on grid (0.5 m); collision proxies
7Set-dressingrule-based scatter (rocks, palms, reeds, crates, carts, bones) per biome + hand-placed hero propsinstance lists per chunkdensity budget; nothing on roads; no floating props (raycast test)
8Vegetationinstanced palms/reeds/grass with wind vertex shader + impostors beyond 80 minstance buffersdraw calls per chunk ≤ budget
9Lighting & moodfour keyframes per area (dawn, day, dusk, night) on one sun + IBL; per-area fog/grade from mood over every phase; weather profiles from time-weather.json; baked AO for kitslighting presets per phase + weather profilescaptures across the review matrix match the mood; no blown highlights; telegraph contrast passes in every state on Low
10Streaming2-ring prefetch around the player, priority by camera direction; budgeted uploads per framestreamerhitch < 8 ms p99 while riding at 10.5 m/s
11Audio bedsone bed per area plus one spot emitter on its landmark (kiln roar, canal water, forge…); environment-only ordinary outdoor travel/combat; engaged named boss themes are permitted (ADR-026)audio mapambience changes within 5 s of crossing a boundary

◆Biomes

AreaGroundHero propsMood
Amber Gatesandstone pavers, packed sandtwin-roof gate, bell tower, stallsgolden afternoon, lanterns
Dewgrass Meadowshort grass, dew terraceswicker bridges, fallen training logsoft morning haze
Old Orchardorchard soil, fallen fruitamber trees, toll shedsdappled sun
Reedwater Banksmud, shallow water, reedsthree-arch canal bridgeteal reflections
Clay Cutochre clay terracesquarry crane, canal locksharsh ochre
Cinder Kilnsgrey ash, brickkilns + chimneys, ember pitsred glow, smoke shafts
Saltway Flatswhite salt crust, puddlescauseways, windbreaksglare
Bellshade Courtflagstones, sandshrine steps, silent bells, pillarsviolet dusk
Stormquill Ridgewind-cut rockcopper relay posts, roostsovercast, lightning
Ashroot Groveash, green rootsblack cedars, the lost caravanash haze
Jade Seal Ruinscracked jade stonecourts, sealed western gatecold jade rim light
Caravan Crown Arenapacked earth ringcaravan-wheel yarddust-storm red

◆Time of day and weather

In from day one (ADR-030). time-weather.json holds the four phases, the five weather states, the weather each area allows, each area's signature phase and the budgets. Look and sound only; the server owns the clock. An area keeps its mood as a grade and fog profile over every phase, and the 12 story-camera captures are taken at the area's signature phase. Rules for authoring and review: development guide.

◆Making it feel wide (Silkroad scale)

  • Long sightlines: far terrain LOD + impostor skyline (distant cliffs, cities on the horizon) and a sky dome with sun haze.
  • Travel rhythm: 30–60 s of quiet road between areas, landmarks visible from far away (bell tower, kiln smoke, relay towers).
  • Caravan life on roads: NPC caravans walking set routes (cheap instanced crowds, no AI), dust devils, birds.

◆Tests and evidence

Generators run in CI with fixed seeds (hash test). Bots walk the road graph. A fixed set of 12 story-camera screenshots (one per area) is captured after every environment task, so progress compares like for like. Captures go in logs/evidence/world/<area>/<UTC>.png.

Source: zoen/docs/production/ENVIRONMENT.md · 1,041 words · edit the Markdown, not this page.