How To: Make a Game Use a Variable Time Step
The Complete Sample
The code in this topic shows you the technique. You can download a complete code sample for this topic, including full source code and any additional supporting files required by the sample.
Making a Game Use a Variable Time Step
To make a game use a variable time step
Create a class that derives from Game.
Set IsFixedTimeStep to false.
This causes Update to be called as often as possible instead of being called on a fixed interval.
Since the amount of time between calls to Update will vary, specify any rates used in the game as units per millisecond (ms).
This indicates the amount of time that has passed since the last call to Update.
Determine the change that occurred since the last update by multiplying any rates being used by the elapsed time.