Frames per second

What's the best way to implement a frames per second cap? I'm currently using a system that sleeps a variable amount of time in between frames and updates the variable every second to match the cap. Is this a reasonable way to do things? (I'm also using the actual Sleep() function to do this, and I suspect that may be a bad idea. Is it? and if so, why?)
closed account (3qX21hU5)
Here is a great article on timesteps that should clear things up like fixed timesteps vs variable timesteps and how to implement them.
Last edited on
And..... all my questions are answered, danke.
Topic archived. No new replies allowed.