Hello.
I’ve thinking about game loops and the most popular approach it seems is getting the elapsed time since the last frame and using
that for the next frame’s update method. I’ve treid this approach and it’s not pretty, the game loop trys to run as fast as possible and
then the result is a slightly choppy version of what the game could be.
My idea is to calculate at runtime the average fps of the game and then use that as a frame cap, the problem with this idea is what
if it’s going 70 fps then it’s going 30 fps is it going to be stuck at 50 fps? If you could have a approach that keeps the fps and a certain
level under the choppy fps level that would give you a very smooth game rate and you could still use the elapsed time since last frame.
So I’m thinking how I could implement it myself or use find code that has implemented it.
Thanks.
