"Stuck in the Corner" Bug fixed


Like the title says, I have hopefully squashed the bug where you get stuck on corners occasionally.  You will still occasionally jitter on one, but it's better than getting stuck in it, unable to move, until the game rockets you outwards. Which was an attempt to fix it previously, I might add.

For the curious, here's the iterations of this annoying bug: 

  1. Players can get stuck in solid blocks. Spamming jump will slowly move you out of it.
  2. Problem was most commonly caused by forgetting to check if there was a solid block above you. Added this. Players get stuck less often, but now there's no way out when they do.
  3. Disable checks for solid blocks when it's detected players are stuck so that players simply move out of it. Unfortunately, this causes lots of problems with players just jumping through blocks constantly.
  4. Attempt to gently nudge the player out of the block using their prior x and y location. Instead, this causes them to semi-randomly fling downwards out of the block at top speed.
  5. Attempt combination of 3 and 4. Also adjusted the area collisions are checked in, and played with hitbox shapes and sizes. Nothing really works, and the results are still the same as #4. Doesn't happen to me very often anymore, and I'm out of time to work on the game, so I upload it anyway, hoping most players don't get hit with it. Unfortunately, most do.
  6. Decide to check each corner individually, to see how I need to nudge players out of a block. Experiment with lots of math. Finally get something that occasionally jitters, but mostly just prevents getting stuck longer than a frame or so.

And that's where we are now. Do let me know if you are still getting noticeably stuck. More than little jitters I mean.

Files

AdAstra-v6.zip 13 MB
52 days ago

Leave a comment

Log in with your itch.io account to leave a comment.