sloukit / pydew-valley-uzh

Mod of Pydew Valley for an experimental study in Psychology
Creative Commons Zero v1.0 Universal
28 stars 56 forks source link

Bug: Debugging overlays lock to player camera #143

Open DangerousVanilla opened 1 week ago

DangerousVanilla commented 1 week ago

Describe the bug

Bug Description

After playing for a few minutes with pathfinding and collision box overlays on or off at various times, turning them on at some point showed them locked to the player camera instead of on their respective tiles/objects. When walking around with them on in this state they stay static on the screen while the rest of the graphical content remains unaffected below.

Expected Behavior

The debugging overlays should remain attached to their respective tiles/objects.

Steps to Reproduce

  1. Launch the game and play for a while
  2. Periodically (not rapidly) turn on/off the two debugging overlays with H and P respectively as you play.
  3. At some point the overlays will become disjoined from their intendend content and stay in one position despite moving the character around.

Additional Context

This seems to only effect the overlay display themselves, as collisions, interactions, and NPC pathfinding appeared to all continue as normal despite the overlays displaying incorrectly.

Version

0.1.0

Which aspect(s) of the project is this bug affecting?

game-playtesting

Screenshots

Bug_OverlaysStickToPlayerAfterAWhile

Relevant log output

No response

Code of Conduct

DangerousVanilla commented 6 days ago

After looking further into this it appears as though the overlay issue is tied to the camera's proximity to the scenes edge. That is, when the camera's edge meets the scene edge the overlays continue to move in the opposite direction of the playerj's movement instead of staying where the underlying tiles are. Instead, the overlays should stop moving as the player approaches the edge of the scene as the scene tiles do so everything stays aligned.

Here's a better visual in a screenshot sequence - the yellow line segements are drawn on tracking the distance between a plant and it's intended collision boxes as the player moves upward: Overlay_Offset