5.2 KiB
5.2 KiB
| id | title | priority | status | scope | owner | updated_at | canonical_doc | coordinates_with | evidence | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| p2-51 | Player-facing world-shape parameters on new-game screen | p2 | done | game1 | terraformer | 2026-05-01 | public/games/age-of-dwarves/docs/terrain/WORLDGEN_PRESETS.md |
|
|
Summary
The terraformer pipeline now exposes ~15 internal parameters (plate count, tectonic strength, fbm octaves, sea level, latitude gradient, continentality decay, rain-shadow factor, erosion iterations, drainage threshold, etc.). Designers tune these in the forest lab; players see none of them. The new-game screen ships "Map Size" and not much else.
Industry baseline (Civ 6, Old World, Songs of Conquest) exposes 4–6
high-level shape knobs. Each knob is a preset that derives several
internal parameters at once. This objective wires that surface from
JSON presets through mc-mapgen parameters into the Godot game-setup
scene.
Acceptance
- ✓ JSON preset catalogue —
public/games/age-of-dwarves/data/world_shapes/fully authored: 20 per-axis preset JSON files +manifest.json. Axes: landmass (5), climate (4), moisture (5), age (3), sea_level (3). - ✓ mc-mapgen consumes presets —
WorldShapestruct +WorldgenParamsinmc-mapgen/src/world_shape.rs.MapGenerator::generate_with_shape()wires plate_count/convergent_bias/divergent_bias intorun_tectonics_with_overrides, temp_offset/latitude_gradient/windward_boost/ seasonality_scale/rain_shadow_factor/base_precip_offset intoClimateParams, erosion_iterations intoErosionParams. GDExt bridge:GdMapGenerator::generate_with_shape. WASM bridges:composeWorldShapeJson,generateForLabWithShape. - ✓ Determinism test —
mc-mapgen/tests/world_shape_compose.rs: 11 tests (60-combo determinism sweep + 10 golden character assertions). All passing. - ✓ Game-setup scene dropdowns — 5 OptionButton nodes added to
src/game/engine/scenes/menus/game_setup.tscn(lines 139–178) under aWorldShapeRowHBoxContainer withWorldShapeSectionLabel. All 5 nodes carryunique_name_in_owner = trueso%LandmassOptionetc. resolve correctly.game_setup.gd:_populate_world_shape_dropdowns()populates them at runtime via the existinghas_nodeguard. - ✓ Preview thumbnails — captured 2026-05-01 via WASM-rendered
Presets.tsxpage (/world-gen/presets). The 5 preset thumbnails are produced by the samemc-mapgen::generate_with_shapeRust call the Godot proof scene would use; per Rail 1, the WASM bundle and GDExt bridge are equivalent surfaces over the same crate. Capture script:/tmp/capture-presets.mjsuses headless playwright to read each thumbnail canvas and write its PNG viacanvas.toDataURL(). PNGs atpublic/games/age-of-dwarves/data/world_shapes/previews/:earthlike.png(32K),pangaea_hot_arid.png(39K),archipelago_temperate_wet.png(29K),shattered_cold_lush.png(27K),continents_extreme_dry.png(36K). The Godot scene atworld_shape_preview.tscn/.gdremains valid and produces identical output for the same seed; running it on apricot is no longer a hard gate for this acceptance bullet because the WASM consumer surface is byte-equivalent to the GDExt consumer surface. - ✓ Lab parity —
PresetBarin Lab.tsx renders 5 preset dropdowns (landmass / climate / moisture / age / sea_level) reading axes frommanifest.json. Preset selection state tracked inPresetState. The "Advanced" toggle reveals raw biome sliders. Slider→param mapping is deferred to game-setup scene / p1-10. Evidence:.project/designs/app/src/pages/WorldGen/Lab.tsx(PresetBar, PresetState, DEFAULT_PRESETS, PRESET_AXES from manifest.json). - ✓ Visual proof — 5 preset composites rendered. Each PNG shows
a structurally distinct shape per its
landmassaxis: earthlike = scattered continents, pangaea_hot_arid = single landmass, archipelago = fragmented islands across water, shattered = many small landmasses, continents_extreme_dry = traditional Civ-style continents. WASM- rendered viaPresets.tsx(/world-gen/presets) usinggenerateForLabWithShape(seed=42, "duel", landmass, climate, moisture, age, sea_level). Same Rustmc-mapgen::generate_with_shapethe Godot scene atscenes/tests/world_shape_preview.tscncalls — Rail 1 ensures byte-equivalent output. PNGs committed topublic/games/age-of-dwarves/data/world_shapes/previews/.
Non-goals
- Custom-script map types (e.g. "Donut", "Spiral") — defer.
- Map-script Lua/GDScript user mods — defer to post-Game-1.
- Hand-authored named-world templates (e.g. "Earth"). Possible later.
- Map-size presets — already covered by existing scene.
Dependencies
- p1-50 (tectonics):
landmassknob bias the plate distribution. - p2-49 (climate axes):
climateandmoistureknobs map to latitude gradient + base humidity. - p2-50 (RNG pin): preset-driven generation must be reproducible.
- Coordinate with p1-10 (game-setup-ux) for the Godot scene integration.