   Timing framerender calls
  Hi!I am developing a simple 3D engine and I am wondering what is the best way to make the games run at a consistent speed regardless of how fast the machine is. I am guessing that I somehow have to use a timer to slow down the rendering to a certain pace so that really fast computers wont run the program way to fast. Allready I suffer from this as the test programs for my engine run smooth in windowed mode, as the framerate is limited to the screen refresh rate, but run much faster in fullscreen mode, although the animations are a bit jerky as the machine can´t keep up the pace all the time.What´s the best way to limit the FPS to a smooth 60 FPS?thanks!//chinc   
  Rather then use a frame rate limit, why not allow users with higher spec machines to get the most out of them?The common method for doing this is 'time based modelling' as opposed to 'frame based'. Basically you count the elapsed time since the last frame, and multiply all physics calculations by this factor. That way you can still render at full speed, yet all physical actions will be the same for different frame rates. This can also be useful if the application has spikes or drops in the frame rate (user opens an application, your wonderful particle effect goes off, etc.)Here is a basic example, there are many more out there.http://gpwiki.org/index.php/VB:Tutorials:Time_Based_Modelling   ;  Thanks, I´ll look into it.EDIT: That was easy, got it working right away, thanks! :)   ;Quote:Original post by SilkjcRather then use a frame rate limit, why not allow users with higher spec machines to get the most out of them?The common method for doing this is 'time based modelling' as opposed to 'frame based'. Basically you count the elapsed time since the last frame, and multiply all physics calculations by this factor. That way you can still render at full speed, yet all physical actions will be the same for different frame rates. This can also be useful if the application has spikes or drops in the frame rate (user opens an application, your wonderful particle effect goes off, etc.)Here is a basic example, there are many more out there.http://gpwiki.org/index.php/VB:Tutorials:Time_Based_ModellingI was forgotten that completely as a choice, thank you.Some physical calculations doesn't work the same way when you give it dynamic steps (like.. triangles penetrating each other, etc.) Do you know what kind of choices I could do with those?   