Biomes B: data-driven terrain + biome ground layer (foundation) #136
Labels
No labels
alpha:wave-0
alpha:wave-1
alpha:wave-2
alpha:wave-3
area:assets
area:combat
area:ecology
area:infra
area:render
area:scripting
area:ui
area:world
enhancement
epic
migration
post-alpha
roadmap
tech-debt
type:bug
type:chore
type:design
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
marco/IsoMmo#136
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Foundation slice of the Biomes system. Design:
docs/game-design/systems/biomes.md(parent #135).Turn the world's single grass field into multiple walkable biome grounds, replacing the hardcoded terrain predicates with a data-driven descriptor.
Scope
Shared: add aBiomeenum (Grassland, DrySavanna, NorthernGrassland, Tundra, Desert{sand,salt}, Rocky{ground,mountain}, Volcanic, Marsh) + a staticBiomeInfodescriptor(walkable, moveCostScale)as the single source (noIConfiguration, no magic literals).TileMapto hold abiome[,]grid and makeIsWalkable/IsObstacle/BlocksSightread the descriptor instead of== Grass/== Tree. Marsh becomes walkable (blocks-sight stays false)..-> Grassland,~-> Marsh,Sspawn (#fixture handled in issue D).content/maps/world.map(or a test map) so several biomes are reachable.GridRenderer.DrawGround: pick the biome texture set per cell, select the_1..4variant fromHash(x,y)(today alwaystiles[0]), apply the hash-driven horizontal flip.TileMap.cs,TerrainType.cs) and the marsh assertions inTileMapTests.Not here
Move-cost (C), fixtures/object-layer (D), per-biome scatter (E), art import (A). Terrain stays off the wire -> no
ProtocolVersionbump (confirm noServerMessageserializes terrain).Definition of Done (delta beyond base DoD)
~cell.TileMapwalkability/sight is data-driven -- adding a biome is a descriptor row, no newif/switch in the predicates.Technical design review — agreed (go-with-changes)
Ran
critical-design-reviewbefore implementation. Base branch:feat/biomes-foundation(offmain).Decisions: extend
TerrainTypewith biome ground values (interim —Treestays a member; the cleanBiome/Fixturetwo-grid split lands in issue D); add a small multi-biome patch to the realcontent/maps/world.map.Approach: data-driven
TerrainInfodescriptor(Walkable, BlocksSight)[MoveCost deferred to C]; predicates + legend become tables (no switch);Marsh.Walkable = true. Client:GridRenderertakes aBiome -> Texture2D[]map; per-cell variant+flip selection is a pure helper inIsoMmo.Client.Core(unit-tested); per-biomePlaceholderArttinted fallback so the repo runs withoutassets.isoa.Invariants Check (vs CLAUDE.md ## Design checklist)
TileMap.IsWalkableread server-side byMovementSystem; marsh-walkable is a server rule; no client positions; no new spammable intent.TerrainTypeabsent fromProtocol/+Networking/(grep) → no bump.TileMapimmutable afterParse(startup); noWorldstate/lock added.TileMap/TerrainInfo(Shared);Worldunchanged.GridRenderercomponent, notGameScreen.Client.Core, unit-tested;GridRendererconsumes it.TerrainInfotable lookups; thechar↔TerrainTypelegend becomes a data table (not the currentParseswitch). New biome = one row.TileMapis committed content loaded at startup, not entity serialization; no file access in the tick.TileMappure .NET; rendering uses existing cross-platform MonoGame calls.PlaceholderArtdiamond when its texture set is empty → runs withoutassets.isoa.TileDataper-tile flags (impassable/wet/…) as the data-driven descriptor; diverges by using our small enum +TerrainInfoinstead of the full UO table.TileMap.cs; DoD already in this issue.No
✗, no HARD GATE tripped. Implementation proceeds with TDD.