gmuGADIG / FetchQuest

woof woof (Game created by GMU GADIG in Fall 2024)
8 stars 0 forks source link

Make holes correctly relocate the player when falling into them #125

Open Justin1L8 opened 1 week ago

Justin1L8 commented 1 week ago

When a player falls into a hole, they should be damaged once and relocated to their last safe position. To implement this, update a last_safe_position variable every frame if the player's position is considered safe. A position is safe if there are no holes within some small radius of the player (they should not be relocated a pixel away from the edge).

(Current behavior just teleports them away from the hole node's position by a constant amount. this happens every frame, so it typically kills the player instantly.)