Skip to content

Iso 2.0 [6/12]: Player Occlusion — Wall Blocks, Fence See-Through Gaps #220

@putersdcat

Description

@putersdcat

Spec reference

IsoRenderingPlanV2.1.md §6.2 Player Occlusion; §Addendum B §5

Goal

The player sprite draw-order is correct relative to nano tiles:

  • Behind a stone wall: player is fully hidden (wall is opaque solid geometry).
  • Behind a fence: player is partially visible through fence rail gaps.
  • In front of both: player draws on top correctly.

Technical requirements

  • Two-pass render: terrain + nanos first (sorted by row), then players.
  • Player at same row as wall → player drawn BEFORE wall (wall occludes).
  • Player at same row as fence → fence SVG has transparent gap areas → player visible.
  • Sort key: sortY = (row + 0.5) * HALF_H * 2 ensures fence drawn after player at same row − 1.

Acceptance criteria (ALL required to close)

  • render_nano_scene with player at behind position of stone-wall → player NOT visible.
  • render_nano_scene with player at behind position of fence → player partially visible through gaps.
  • render_nano_scene with player in front of both → player on top.
  • PNGs committed: ProgressEvaluations/occlusion-wall-behind.png, occlusion-fence-behind.png, occlusion-front.png.

Verification command

render_nano_tile kind=stone-wall variant=straight-h includePlayer=[behind] outputPath=ProgressEvaluations/occlusion-wall-behind.png
render_nano_tile kind=fence variant=straight-h includePlayer=[behind] outputPath=ProgressEvaluations/occlusion-fence-behind.png

Metadata

Metadata

Assignees

No one assigned

    Labels

    iso-2.0-experimentIsometric Rendering 2.0 clean-sheet experimentrenderingRendering enginespritesSprite system

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions