feat(world): biomes foundation — data-driven terrain + walkable biome grounds (#136) #142

Merged
marco merged 2 commits from feat/biomes-foundation into main 2026-07-22 14:06:06 +02:00
Collaborator

Foundation slice of the Biomes system (design #135 → issue #136). Also carries the agreed
design doc (docs/game-design/systems/biomes.md) + vision index update.

Closes #136. Design: #135.

What this does

  • Data-driven terrain descriptor (TerrainInfo — a table of (Walkable, BlocksSight)), replacing
    the hardcoded == Grass/== Tree predicates in TileMap. Adding a biome is one row, no switch.
  • 8 biome ground types added to TerrainType (dry savanna, northern grassland, tundra, desert
    sand, salt plain, rocky ground, mountain rock, volcanic) + a data-table legend (y n t d l r m v).
  • Marsh is now walkable (still open to sight) — it will slow you in #C; here it is just crossable.
  • Per-cell variant + flip selection extracted to a pure, unit-tested helper in
    IsoMmo.Client.Core (GroundTileSelector).
  • Per-biome rendering (GridRenderer + BiomeVisuals tables): biome→texture set, with a
    per-biome placeholder tint so every biome reads even without art in the pack.
  • world.map: a band of biomes south of spawn so several are reachable on foot.

Not here (later slices)

Move-cost / marsh slow (#138), fixtures object-layer (#139), per-biome scatter + seam feathering
(#140), importing the authored art (#137). Interim: Tree stays a TerrainType member until the
biome/fixture split in #139.

Invariants Check

Ran critical-design-review; full Invariants Check persisted on #136 (comment). No , no HARD GATE
tripped. No ProtocolVersion bump (terrain never crosses the wire — verified).

Verification

  • dotnet build whole solution: 0 warnings. CSharpier clean.
  • All tests green (369): Shared 65 (incl. new TerrainInfoTests + biome/marsh cases),
    Client.Core 81 (incl. GroundTileSelectorTests), GameServer 190, Auth 12, Assets 4, Extractor 17.
  • Ran the client (DebugHarness): walked south from spawn across the biome bands — grass, dry
    savanna, desert sand, salt plain, rocky/mountain render as visibly distinct ground; and walked
    onto marsh
    (previously impassable). Player-observable DoD met.

Definition of Done (#136)

  • A straight walk crosses ≥4 visually distinct biome grounds (verified in-client).
  • Marsh is walkable (verified in-client + TileMapTests).
  • Per-cell ground variety, deterministic (GroundTileSelectorTests).
  • Walkability/sight data-driven — adding a biome is a descriptor row, no predicate switch.
Foundation slice of the **Biomes** system (design #135 → issue #136). Also carries the agreed design doc (`docs/game-design/systems/biomes.md`) + vision index update. Closes #136. Design: #135. ## What this does - **Data-driven terrain descriptor** (`TerrainInfo` — a table of `(Walkable, BlocksSight)`), replacing the hardcoded `== Grass`/`== Tree` predicates in `TileMap`. Adding a biome is one row, no switch. - **8 biome ground types** added to `TerrainType` (dry savanna, northern grassland, tundra, desert sand, salt plain, rocky ground, mountain rock, volcanic) + a **data-table legend** (`y n t d l r m v`). - **Marsh is now walkable** (still open to sight) — it will slow you in #C; here it is just crossable. - **Per-cell variant + flip** selection extracted to a pure, unit-tested helper in `IsoMmo.Client.Core` (`GroundTileSelector`). - **Per-biome rendering** (`GridRenderer` + `BiomeVisuals` tables): biome→texture set, with a **per-biome placeholder tint** so every biome reads even without art in the pack. - **`world.map`**: a band of biomes south of spawn so several are reachable on foot. ## Not here (later slices) Move-cost / marsh slow (#138), fixtures object-layer (#139), per-biome scatter + seam feathering (#140), importing the authored art (#137). Interim: `Tree` stays a `TerrainType` member until the biome/fixture split in #139. ## Invariants Check Ran `critical-design-review`; full Invariants Check persisted on #136 (comment). No `✗`, no HARD GATE tripped. No `ProtocolVersion` bump (terrain never crosses the wire — verified). ## Verification - `dotnet build` whole solution: **0 warnings**. CSharpier clean. - **All tests green** (369): Shared 65 (incl. new `TerrainInfoTests` + biome/marsh cases), Client.Core 81 (incl. `GroundTileSelectorTests`), GameServer 190, Auth 12, Assets 4, Extractor 17. - **Ran the client** (DebugHarness): walked south from spawn across the biome bands — grass, dry savanna, desert sand, salt plain, rocky/mountain render as visibly distinct ground; and **walked onto marsh** (previously impassable). Player-observable DoD met. ## Definition of Done (#136) - [x] A straight walk crosses ≥4 visually distinct biome grounds (verified in-client). - [x] Marsh is walkable (verified in-client + `TileMapTests`). - [x] Per-cell ground variety, deterministic (`GroundTileSelectorTests`). - [x] Walkability/sight data-driven — adding a biome is a descriptor row, no predicate switch.
marco merged commit 4c39a9755f into main 2026-07-22 14:06:06 +02:00
marco deleted branch feat/biomes-foundation 2026-07-22 14:06:06 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
marco/IsoMmo!142
No description provided.