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

Started by
-1 comments, last by sofakng 15 years, 2 months ago
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?

This topic is closed to new replies.

Advertisement