Sign in to follow this  
halileohalilei

Frame rate handling

Recommended Posts

halileohalilei    170

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
ultramailman    1720
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this