Fold marsh scatter / terrain decoration into passable statics (remove terrain-type render logic) #141

Closed
opened 2026-07-22 13:56:46 +02:00 by marco · 2 comments
Owner

Follow-up from #89. The static content system made server collision and the static render reason purely on tile flags (walkable? blocks-LOS?) + a generic static/<id> draw — no per-art-type logic. The one residual is the marsh scatter (lily/reeds/sedge): the client still special-cases TerrainType.Marsh to procedurally place decoration (GridRenderer.VisibleMarshScatter/DrawMarshScatter), which is terrain-type logic in the render.

Goal

Remove the last terrain-type branch from the client render: decorations become passable statics (blocks=false) drawn like any other static, so the runtime (server + client) only ever reasons on flags, never on "is it a lily".

Scope

  • Add lily/reeds/sedge (and future decoration) to StaticCatalog with blocks=false.
  • Place them as statics instead of procedurally in the renderer. Decide the placement source: authored (editor #113) vs an offline decoration generator that emits static rows (the "marsh -> scatter" knowledge lives in authoring/content, not the runtime).
  • Delete GridRenderer.VisibleMarshScatter/DrawMarshScatter and the WorldKind.Reeds special case; render them through the uniform static path.
  • Preserve the current look (variety, nudge, mirror, lily-vs-clump).

Out of scope

  • New decoration art (reuse the existing reeds/lily/sedge static/ art).

Fits with the biomes work (#135) and the map editor (#113).

Follow-up from #89. The static content system made server collision and the static **render** reason purely on tile flags (walkable? blocks-LOS?) + a generic `static/<id>` draw — no per-art-type logic. The **one residual** is the marsh scatter (lily/reeds/sedge): the client still special-cases `TerrainType.Marsh` to procedurally place decoration (`GridRenderer.VisibleMarshScatter`/`DrawMarshScatter`), which is terrain-type logic in the render. ## Goal Remove the last terrain-type branch from the client render: decorations become **passable statics** (`blocks=false`) drawn like any other static, so the runtime (server + client) only ever reasons on flags, never on "is it a lily". ## Scope - Add lily/reeds/sedge (and future decoration) to `StaticCatalog` with `blocks=false`. - Place them as statics instead of procedurally in the renderer. Decide the placement source: authored (editor #113) vs an **offline** decoration generator that emits static rows (the "marsh -> scatter" knowledge lives in authoring/content, not the runtime). - Delete `GridRenderer.VisibleMarshScatter`/`DrawMarshScatter` and the `WorldKind.Reeds` special case; render them through the uniform static path. - Preserve the current look (variety, nudge, mirror, lily-vs-clump). ## Out of scope - New decoration art (reuse the existing reeds/lily/sedge `static/` art). Fits with the biomes work (#135) and the map editor (#113).
Author
Owner

⚠️ Overlaps #140 (per-biome scatter + biome-border feathering). Recommended sequencing: #141 first — it establishes the mechanism (decoration = passable blocks=false statics, remove the TerrainType.Marsh render branch); then #140 layers per-biome scatter content on top of that mechanism instead of re-adding procedural render logic. Reconcile so we don't ship two competing scatter paths.

⚠️ **Overlaps #140** (per-biome scatter + biome-border feathering). Recommended sequencing: **#141 first** — it establishes the mechanism (decoration = passable `blocks=false` statics, remove the `TerrainType.Marsh` render branch); **then #140** layers per-biome scatter content on top of that mechanism instead of re-adding procedural render logic. Reconcile so we don't ship two competing scatter paths.
Author
Owner

Closing — done by #143. The procedural marsh-scatter render path this issue targets (GridRenderer.VisibleMarshScatter/DrawMarshScatter, the TerrainType.Marsh branch) and GroundTileSelector were deleted in #143; the map is now fully static and no runtime code branches on marsh/reeds/lily/tree — server and client reason only on flags. The 'remove terrain-type render logic' goal is met.

The remainder — re-adding marsh/biome decoration as authored passable statics (blocks=false), placed via the map editor (#113) or an offline generator — lives in #140. No separate work here.

Closing — **done by #143**. The procedural marsh-scatter render path this issue targets (`GridRenderer.VisibleMarshScatter`/`DrawMarshScatter`, the `TerrainType.Marsh` branch) and `GroundTileSelector` were **deleted** in #143; the map is now **fully static** and no runtime code branches on `marsh`/`reeds`/`lily`/`tree` — server and client reason only on flags. The 'remove terrain-type render logic' goal is met. The remainder — **re-adding** marsh/biome decoration as **authored passable statics** (`blocks=false`), placed via the map editor (#113) or an offline generator — lives in **#140**. No separate work here.
marco closed this issue 2026-07-22 16:21:00 +02:00
Sign in to join this conversation.
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#141
No description provided.