soulweaver91 / project-carrot

Project Carrot, an open source spiritual clone of the Jazz Jackrabbit 2 game engine
https://carrot.soulweaver.fi/
MIT License
39 stars 4 forks source link

Find a way to bring FPS to exactly 70 #45

Open soulweaver91 opened 8 years ago

soulweaver91 commented 8 years ago

Right now, the core timer is based on QTimer. It only supports intervals rounding to whole milliseconds, so effectively there is a new frame every 14 ms instead of the desired ~14.29 ms, resulting in an effective FPS of ~71.43.

There should be a way to bring this to exactly 70 FPS. (Ideally, game logic loop should be separated at some level from the graphics loop anyway – right now they are tied together very closely.)

soulweaver91 commented 7 years ago

Attempted some approaches: