Nisse silhouette outline when occluded by world objects #33
Reference in New Issue
Block a user
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?
Problem
After Y-based depth sorting (#31), Nisse sprites correctly sort with trees and buildings — but this means a Nisse behind a tree becomes completely invisible.
Solution
Give each Nisse a second "outline" sprite that is always rendered above all world objects:
outlineSprite: same texture, scaled 1.3×, white fill (setTintFill(0xffffff)), alpha 0.7, depth 900floor(y / TILE_SIZE) + 5(Y-sorted with world objects)Behaviour
Depth layout after this change