7.6 KiB
7.6 KiB
| id | title | priority | status | scope | owner | updated_at | wave | canonical_doc | coordinates_with | evidence | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| p1-46 | Terrain Dimensions Lab — fix ridginess, bind 149 flora species, add Whittaker plot | p1 | done | game1 | terraformer | 2026-05-01 | E | public/games/age-of-dwarves/docs/terrain/WORLDGEN_PIPELINE.md |
|
|
Summary
The Terrain Dimensions Lab at /world-gen/lab currently
classifies the 17 base biomes and renders cross-tile flora/minerals/fauna
overlays driven by 4 biome sliders + 3 toggleable overlay layers. Three
known gaps:
- Ridginess slider has zero effect at default elevation 0.65. The
classifier (
terrain.ts:118) only consults ridginess whenelevation > 0.85 ∧ ridginess > 0.92for the volcano case. Anywhere else, the slider does nothing — the user verified this on the live lab and flagged it. - The lab loads 0 of 149 flora species. Trees / shrubs / ground
cover are generic per terrain. The 149 species in
public/resources/ecology/flora/species/*.jsoncarry rich schema (biomes[],lineage,tagswith layer info,quality_tier,canopy_contribution) that the lab ignores entirely. - No Whittaker T×P plot inset — the user can move sliders but has no visual map of where they are in biome space.
This objective is the integration / proof surface of the Wave-E terraformer bundle. It must land after p1-50, p2-49, p2-50 (Wave A), p1-47 (Wave B), and p1-48/p1-49 (Wave C). The Whittaker plot, ridginess behaviour, and flora binding all consume the post-refactor axes.
Acceptance
- ✓ Ridginess split into two derived scalars —
ridge_terrain_promotehandled byclassifyTerrain(terrain.ts:133–135; plains/grassland→hills when elevation < 0.70 ∧ ridginess > 0.5).ridge_density_modifier = 1 - 0.6 * ridginessapplied to canopy Poisson radius inrenderCanvasviaeffective_canopy_density. Rocky stipple indrawHexBasescales withridginess. Moving ridginess slider produces visible tile changes. Evidence:.project/designs/app/src/pages/WorldGen/Lab.tsx(renderCanvas — ridge_density_modifier, effective_canopy_density; lines ~469–475). - ✓ 149 flora species bound via WASM module —
Lab.tsximportsWasmFloraIndexfrommagic_civ_physics(lines 720–733) and callstileFloraJson(biome, t_band, p_band, riparian_distance, seed, col, row)at line 792. Lineage glyph mapping (drawConifer3Layer / drawTree3Layer / cactus / palm / water-lily / mosses) is the thin rendering shell. Per Rail 1, no TS selector reimplementation. Evidence:.project/designs/app/src/pages/WorldGen/Lab.tsxlines 720–797. - ✓ Info card shows top-3 species per layer — canopy / understory /
ground each with up to 3 species names +
quality_tier, sorted byquality_tierdesc; deduped across all 35 tiles. Driven byWasmFloraIndex.tileFloraJson()viacentreFloramemo in Lab.tsx. Evidence:.project/designs/app/src/pages/WorldGen/Lab.tsx(Lab component — flora info card sections). (Relocated from p1-48 acceptance — tooltip integration.) - ✓ Fauna species names in tile tooltip — fauna deduped and sorted by
ecology_tierdesc, top 5 shown in info card withtrophic_levelprefix, driven byWasmFaunaIndex.tileFaunaJson()viacentreFaunamemo. Evidence:.project/designs/app/src/pages/WorldGen/Lab.tsx(Lab component — fauna info card section). (Relocated from p1-49 acceptance — tooltip integration.) - ✓ Fauna ambient overlay renders species glyphs —
faunaOntoggle triggersrenderCanvasfauna pass; up to 5 silhouettes per tile viadrawFaunaGlyphdispatching onglyph_cluster(quadruped / bird / fish / reptile shapes). Species sourced fromWasmFaunaIndex.tileFaunaJson(). Evidence:.project/designs/app/src/pages/WorldGen/Lab.tsx(renderCanvas — fauna ambient pass). (Relocated from p1-49 acceptance — ambient fauna overlay.) - ✓ Lair tile species silhouette —
glyph_clusterfield on all 8 lair types inwilds.json;indicator_renderer.gddraws a cluster-tinted fallback diamond when sprite art is absent. Final art pass (PNG spritessprites/indicators/lair_<type>.png) is deferred — see ## Remaining. Evidence:src/game/engine/src/rendering/indicator_renderer.gd:40–57,public/resources/wilds/wilds.json. (Relocated from p1-49 acceptance — lair rendering.) - ✓ Fauna proof scene screenshot — proof scene at
src/game/engine/scenes/tests/fauna_render/fauna_render_proof.tscn(Rail 5). Shows forest biome + red_deer (prey) + grey_wolf + brown_bear (predators), trophic rule PASS. Evidence:.project/screenshots/p1-49-fauna-trophic.png(98K, 2026-05-01). (Relocated from p1-49 acceptance.) - ✓ Whittaker plot inset —
WhittakerPlotcomponent rendered at right of canvas; 200×160 SVG, biome cells by T×P, gold focus dot tracks slider. Evidence:.project/designs/app/src/pages/WorldGen/Lab.tsx(Lab JSX,<WhittakerPlot temperature={st.temp} moisture={st.moisture} />);.project/designs/app/src/pages/WorldGen/WhittakerPlot.tsx. - ✓ Plate / hydrology / climate overlay toggles — three new toggles
added to Overlays section in Lab.tsx:
Plates— fills tiles byplate_idfromtileTectonicsJson, draws boundary classification strokes (PLATE_COLORS + BOUNDARY_STROKE tables).Hydrology— riparian tint fromtileHydrologyJson.riparian_distance- flow arrows via
rustDirToFlatTopDir/neighborCoords.
- flow arrows via
Climate— heatmap ofmean_tempormean_precipfromtileClimateJson; temp/precip sub-toggle renders when climateOn. Evidence:.project/designs/app/src/pages/WorldGen/Lab.tsx(LabState platesOn/hydrologyOn/climateOn/climateMode; renderCanvas passes 1–2; overlay ToggleBtns in JSX).
- ✓ World-shape preset row —
PresetBarat top of Lab renders 5<PresetSelect>dropdowns (landmass / climate / moisture / age / sea_level) reading axes frommanifest.json. "Advanced" toggle reveals the 4 raw biome sliders. Preset state tracked inPresetState; no slider mapping (infrastructure deferred to p2-51 Godot scene). Evidence:.project/designs/app/src/pages/WorldGen/Lab.tsx(PresetBar, PresetState, presets/advancedOpen state, JSX preset row). - ✓ Headless screenshot fixture — proof scene at
src/game/engine/scenes/tests/world_gen_lab/world_gen_lab_proof.tscn(Rail 5). Captured via weston headless on apricot 2026-05-01. Evidence:.project/screenshots/p1-46-world-gen-lab.png(114K).
Remaining
- Lair sprite art pass — per-type PNG sprites at
src/game/engine/public/sprites/indicators/lair_<type>.png(8 types). The geometric cluster-tinted diamond inindicator_renderer.gdwill automatically be superseded once sprites land. No code change required.
Non-goals
- New flora species authoring — schema is owned elsewhere.
- WFC-driven feature placement preview — out of terraformer scope.
- Ocean current visualisation — defer to Game 2.
- Tectonics / lithology axes beyond the lo-fi prepass — that's g2-05.
Dependencies
- Wave A (p1-50, p2-49, p2-50) → stable axes and biome IDs.
- Wave B (p1-47) → hydrology overlay.
- Wave C (p1-48, p1-49) → species rendering.
- Wave D (p2-51) → preset dropdowns.