CodeCafeOpenShiftGame / PodEscape

Endless runner of a pod trying to escape from a project being deleted.
https://podescape.io
Apache License 2.0
29 stars 16 forks source link

[Bug] Dashing into obstacle may get you stuck #57

Open Venefilyn opened 4 years ago

Venefilyn commented 4 years ago

Describe the bug Sometimes when dashing into an obstacle your character will simply stop, not die, and you can't move anything

To Reproduce Not reproducible 100% of the time.

Steps to reproduce the behavior:

  1. Start game
  2. Dash into obstacle
  3. Maybe get stuck and unable to do anything

Expected behavior You die

Screenshots If applicable, add screenshots to help explain your problem. https://cloud.spytec.se/s/wC3LQxEjJTa77HX

Desktop (please complete the following information):

RoddieKieley commented 4 years ago

Attempted to reproduce, reproduced, and found that the Dash state upon entering does:

this.playerCollisionShape.Disabled = true; this.slideCollisionShape.Disabled = false;

if the player is on the floor. However on Dash Exit it does not revert those values. Commit 9d4cb6953056f75a72cb4060fd3c35e4351cf1dc to the fix-collision-bug branch appears to resolve that.

The previous commit to the same branch, c94f3bfb2f26a8481c0498bbd242d6da017b2027 appears to resolve a related issue related to not dying on the Block edge in particular.

Needs third party testing and review before merge @ernesgonzalez33 @rluders @dudash

ernesgonzalez33 commented 4 years ago

After debugging for a while I found that the issue was that when the end of the dash is just before the obstacle, the death animation is not playing. This code in Player waits for the "Fall" animation to finish and then ends the game.

Now it does not wait for the animation but for a timer to finish. Reproduced and now when this issue occurs it just waits for a second an a half (what the animation lasts) and it ends the game. PR #59

Won't close the issue since this problem needs further investigation to what is making the animation don't play.

Needs third party testing and review before merge @RoddieKieley @rluders @dudash