Quote Originally Posted by lnpneil
OnIdle is called only once, as the application transitions into an idle state. It is not called continuously unless Done is set to false. Applications that set Done to false consume an inordinate amount of CPU time, which affects overall system performance.

In all the examples I've seen Done is set to false (obviously so that the game loop is a *loop* I guess ) ... does this imply that using a timer in some fasion is more efficient for the CPU?

Neil
No, it's not more efficient.. simply, setting to done the method is called again and again forever (until it have done set to true). That's why it consumes all the cpu time.
If you use TDxTimer and set interval to 0, you get the same situation: the event handler is called again and again.
In both case you can set pauses in the cicle, setting the timer interval to a nonzero value or using the instruction slepp() in the Idle event.
Pauses are used if you need a fixed fps. Fixed fps is usually good for 2d (that's no need to get a fps faster than 30), but 3d games usually try to do as many cicle as they can, adjusting the world movement by the reciprocal of fps (ie: if fps=20 move the character by 10, if fps=40 move the character by 5)

PS: for alimonster: your last link is broken, you must add an "L" at the end