HurricanGame / Hurrican

Freeware jump and shoot game created by Poke53280, based on the Turrican game series by Manfred Trenz
62 stars 22 forks source link

Timer fix #63

Closed Mia75owo closed 1 year ago

Mia75owo commented 1 year ago

This fixes a bug in the game speed calculation (see commit messages).

Steps to reproduce the bug: Start the game (compiled in debug mode) and enter the command

maxfps 10

into the console.

I also changed the mechanic, which splits the physic calculations into multiple steps, when the game runs with a low framerate. The game speed is now even between these steps. Please let me know if there is a good reason for the chunks to not be even.

drfiemost commented 1 year ago

Didn't dig deep in the changes but I can see the vast improvement in 10 FPS mode and no regression in full FPS.

As a further step I think it would be possible to move SpeedFaktor and its logic into the Timer class, all those global vars are quite annoying.