FixedTimeStep configuration for variable hardware performance
0 reputation · 07 Nov 2020, 21:05 UTC
MonoGame GameLoop Timing
The IsFixedTimeStep property in MonoGame ensures that the Update method is called at a consistent interval defined by TargetElapsedTime. This mechanism is designed to keep game logic speed independent of the hardware's rendering capabilities by allowing multiple updates per single Draw call.
When IsFixedTimeStep is enabled, the internal loop accumulates elapsed time to trigger updates. However, a performance bottleneck where the Update logic consistently exceeds the TargetElapsedTime can lead to a cumulative delay in the game loop.
There is uncertainty regarding the optimal configuration to prevent the "spiral of death" without sacrificing the deterministic physics benefits of a fixed time step.
- What is the recommended threshold for
TargetElapsedTimeto balance physics stability and CPU overhead on low-end hardware? - Is there a documented configuration to cap the maximum number of updates performed per frame to prevent loop saturation?