Hacker News new | ask | show | jobs
by badminton1 3362 days 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?
4 comments

If 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/

In 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.)
Not even if you always pass the same frame step from your engine independently of your actual frame rate?
Then you used it wrong, as you should never tie your simulation to the frame rate. Given same input, Box2d is deterministic.