Closed Stevendotcom closed 1 month ago
if you comment line Delving_Into_Darkness.cpp:23 the character can accelerate a lot more, and can also gain istant speed. In line 72-73 of game.cpp you use:
player.speed.x += dirVector.x * player.acceleration; player.speed.y += dirVector.y * player.acceleration;
and should be:
player.speed.x += dirVector.x * player.acceleration * GetFrameTime(); player.speed.y += dirVector.y * player.acceleration * GetFrameTime();
You also apply it to
player.playerRect.x += player.speed.x * GetFrameTime(); player.playerRect.y += player.speed.y * GetFrameTime();
but next frame the speed is not update, so the issue gets compund.
if you comment line Delving_Into_Darkness.cpp:23 the character can accelerate a lot more, and can also gain istant speed. In line 72-73 of game.cpp you use:
and should be:
You also apply it to
but next frame the speed is not update, so the issue gets compund.