feat: static/object layer — Tree off terrain to sparse statics (#89) #144
No reviewers
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!144
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/static-object-layer"
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?
Summary
The object/static layer for the map (#89), built on top of the biomes foundation (#142) — the piece #142 deliberately deferred (and closes #139 "Biomes D: fixtures object-layer").
Andrea's #142 did the terrain half (biome grounds +
TerrainInfo), keepingTreeas an interim terrain type. This PR does the object half: a sparse static layer and movingTreeoff terrain onto it, so a tile's semantics come purely from flags — is it walkable? does it block sight? — never from "is it a tree".TileMapgains a sparseIReadOnlyDictionary<GridPosition, StaticTile>(StaticTile = id + blocks) +StaticAt, and aTileMap.Load(mapText, staticsText)seam (Parsestays for terrain-only tests).IsWalkable/HasLineOfSightnow combineTerrainInfoflags (Andrea's, untouched) with a static'sblocks.Treeleaves the terrain model (TerrainType/TerrainInfo/BiomeVisuals) and becomes a blockingtreestatic.#in the grid is shorthand for one; a siblingcontent/maps/world.statics(x y staticIdrows) places named statics (walls/pillars for the arena #109).blockscomes fromStaticCatalog(adding a static kind = one entry +static/<id>art — extend by data).static/<id>(GridRenderer.VisibleStatics/DrawStatic), no per-type logic; the tree art is renamedstatic/tree. Occlusion-fade generalised to any static.PlaceholderArtshapes as content, new content extracts real UO art. Sole documented exception: the per-biome ground tints (BiomeVisuals) until the biome art import (#137).Follow-ups filed: #141 (fold marsh scatter into passable statics — remove the last terrain-type render branch), #143 (express terrain+static defs as a data file, tiledata-style — coordinate with @andrea). #142's biomes/terrain are untouched.
Screenshots / recording
Piloted from a fresh database via the debug harness. Below: walked south from spawn across the biome bands — the tree line renders from the static layer (depth-sorted, the player fades behind it via occlusion), the biomes (#142) still render as distinct bands, and the marsh scatter (top-right) is unchanged. No regression; trees now come from the object layer, not terrain.
Commands:
login test;goto 24 26;screenshot.How it was tested
TileMapstatics +Load(named static blocks movement + sight; blank/comment lines ignored; bad/unknown/out-of-bounds rows rejected),Parseclassifies#as a blocking tree static on grass;TerrainInfoevery-row + no-terrain-blocks-sight (opacity is now static-only).StaticCatalog.just lint(CSharpier + analyzers, zero warnings) andjust test(402 tests) green; whole solution builds incl. client + tools.Checklist
just lintpasses (CSharpier + analyzers, zero warnings)just testis green🤖 Generated with Claude Code