Archived

This topic is now archived and is closed to further replies.

rcode

Maintaining a constant frame rate

Recommended Posts

rcode    122
I''m using DirectX 8. Is there a way to try to make the game run at a certain frame rate? E.g. If the fps is too high then sleep for a while and then render again. If the fps is too low then don''t do anything (for now). I''ve looked for an algorithm for this but couldn''t find any, and was wondering if anyone could help me with this. Thanks!

Share this post


Link to post
Share on other sites
Midnight Coder    122
All you have to do is after a frame is drawn, wait (in a loop or something) until the fps has gotten to what you want the maximum to be.

But, why would you want to limit the framerate? I don''t see a whole lot of point (besides testing purposes).

Share this post


Link to post
Share on other sites