Hi,
I've been reading about Game Loops and how XNA implements its fixed time step loop vs. variable game loop and have two questions as I'm finding the XNA Framework specifications a bit contradictory.
According to the Game.Draw method specification at MSDN:
Update and Draw are called at different rates depending on whether IsFixedTimeStep is true or false. If IsFixedTimeStep is false, Update and Draw will be called sequentially as often as possible. If IsFixedTimeStep is true, Update will be called at the interval specified in TargetElapsedTime, while Draw will continue to be called as often as possible. For more information on fixed-step and variable-step game loops, see Application Model Overview.
However in the Application model overview it is written:
In a fixed-step game loop, Game calls Update once the TargetElapsedTime has elapsed. After Update is called, if it is not time to call Update again, Game calls Draw. After Draw is called, if it is not time to call Update again, Game idles until it is time to call Update.
This could not be more contradicting. Is a fixed time step game loop calling draw as often as possible or does it call it once and then idles?
1: After some debugging it seems to me that draw is called only once (at most once), am I right?
However I liked deWiTTERS tutorial on game loops (http://dewitters.koonsolo.com/gameloop.html) and would like to use a game loop that has "constant game speed independent of variable fps". The idea is to not waste GPU power by only updating a certain time per second but to draw as many times (using interpolation of coordinates) as possible. This seems to be what the draw method specification actually describes but not what actually happens. So my second question is:
2: how would I best implement a "Constant Game Speed independent of Variable FPS" game loop in XNA?
I have some ideas myself but I would like to know if there is some best practice or if I'm simply wasting my time...