Page 2 of 2

Re: Predicting path of a body/shape

Posted: Wed Oct 12, 2011 10:20 pm
by arahlf
I'm not exactly sure what to take from that link. Is it recommending the use of a constant time step value instead of using what's supplied to love.update? I'm not using any kind of gravity in my test. The only other thing I can figure is that because I'm using the timestep supplied from love.update, the ball collides with the wall (and possibly bites into it a bit?) resulting in inconsistent contact points. Is that possible?

Also, since box2d is non-deterministic, if I have 2 worlds (1 simulation, 1 actual), doesn't that mean the simulation might not actually prove to be true?

Thanks for the replies!

Re: Predicting path of a body/shape

Posted: Wed Oct 12, 2011 10:36 pm
by Taehl
Box2D is non-deterministic, even with a fixed timestep?

Re: Predicting path of a body/shape

Posted: Wed Oct 12, 2011 11:21 pm
by arahlf
I guess I'm not sure, I was just going off of what ivan said earlier.

Re: Predicting path of a body/shape

Posted: Wed Oct 12, 2011 11:48 pm
by arahlf
Actually with the constant time step the collisions seem to be consistent. Going to give the simulation a try w/ that :)

Re: Predicting path of a body/shape

Posted: Thu Oct 13, 2011 7:08 am
by ivan
arahlf wrote:I'm not exactly sure what to take from that link. Is it recommending the use of a constant time step value instead of using what's supplied to love.update?
The Box2D documation says that you should use a constant timestep.
I think that some joints may become unstable when your timestep varies too much.
arahlf wrote:Also, since box2d is non-deterministic, if I have 2 worlds (1 simulation, 1 actual), doesn't that mean the simulation might not actually prove to be true?!
You probably won't notice any difference when your simulation constists of a finite number of billiard balls and you're not trying to predict what happens too far ahead.
Taehl wrote:Box2D is non-deterministic, even with a fixed timestep?
I'm pretty sure that - yes even with a fixed timestep the simulation might differ each time.
I have to look it up though, not sure if this is caused by how the Box2D solver works or if it's a rounding issue.

Re: Predicting path of a body/shape

Posted: Thu Oct 13, 2011 1:24 pm
by bartbes
In any case you can't trust it to be the same.
(Of course the question arises whether this needs to be completely accurate.)