Framerate Independence

From Physics Simulation Wiki

Jump to: navigation, search

Framerate independence is when the simulation is decoupled from the rendering loop and always steps at the same interval. If the framerate is smaller than the simulation frequency, the simulation should do multiple steps per frame to compensate. In Bullet, this is handled by the stepSimulation function, see Stepping the World.

The benefit of framerate independence is that the simulation behaves more predictably. Many physics engines have trouble with Tunnelling when the step size is too large, and behave very unrealistically. Framerate independence keeps the step size at a value that is known to work well for the velocities and objects typically found in the simulation. Also, Determinism is probably impossible without framerate independence.

Please see Canonical Game Loop for a canonical game loop that exhibits typical Framerate Independence, oriented towards Bullet.

Personal tools