• Advertisement
Sign in to follow this  

Frame rate handling

This topic is 1805 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello everyone,

 

I'm trying to write a simple game engine using SDL, but I have problems understanding the basics of the FPS concept. I've already read some tutorials on this but I still seem to be lost. Can anyone explain really simply to me how frame rate handling works?

 

Thank you all in advance.

Share this post


Link to post
Share on other sites
Advertisement
Let's say we want 60 fps. 60 fps means 60 frames per 1000 milliseconds. That's around 16 or 17 milliseconds of time to update and render. If updating and rendering takes less than 16 milliseconds, then wait the remaining time to keep fps near 60.

Thats the gist of it. For further reading, check out an article called "Fix your Timestep!". It's more advanced, but don't let it confuse you.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement