5 ms·
What I remember from Box2D is that the simulation wasn't deterministic but rather dependent on frame rate for example. Is it the same case for this?
by partycoder 10y ago
What I remember from Box2D is that the simulation wasn't deterministic but rather dependent on frame rate for example. Is it the same case for this?
- DiThi 10y agoNot even if you always pass the same frame step from your engine independently of your actual frame rate?
- ewjordan 10y agoIf you tie the frame rate to the physics step, then yes - that will be true for pretty much any physics engine. The classic advice here is http://gafferongames.com/game-physics/fix-your-timestep/ http://gafferongames.com/game-physics/fix-your-timestep/
- maaaats 10y agoThen you used it wrong, as you should never tie your simulation to the frame rate. Given same input, Box2d is deterministic.
- shakiba 10y agoIn JS, if you pass same input it will give you same results. With box2d/planck frequency needs to be constant anyway, and I have not seen any nondeterministic component in the code. (I think in box2d docs it refers differences in execution platforms not the library itself.)