It seems that phaser’s body.blocked variable doesn’t work consistently when my game is running at around 30 fps or lower. When I run against a wall, my player.body.blocked.left or right variable either doesn’t get set to true, or changes rapidly from true to false. It doesn’t affect me when playing on my desktop, but my slower laptop has major problems. I made an example game to show this:
60 fps:
blocked works as intended
~30 fps:
blocked flashes on and off
~20 fps:
blocked only turns true for one frame every few times I hit the wall
Edit: I can’t figure out how to paste the code without it taking up the whole post so here’s the game’s files.
Is there any fix for this?