Jump to content
  • Advertisement
Sign in to follow this  
sofakng

What is a basic example of a seperated update/render game loop?

This topic is 3619 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

I've trying to replicate XNA's game timing system but I'm having trouble and my brain doesn't want to cooperate. Here is a detailed explained of the game loop: http://blogs.msdn.com/shawnhar/archive/2007/11/23/game-timing-in-xna-game-studio-2-0.aspx Here is the basic premise of the XNA game loop: * Call Update as many times as needed to catch up to the current time * Call Draw once * Wait until it is time for the next Update This uses a user-defined fixed timestep (eg. 20 ms). There is also a variable that gets set if the update can't keep up with the timestep amount (the variable is called IsRunningSlow, I think). Does anybody have an example of this type of system?

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!