Predicting path of a body/shape

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
arahlf
Prole
Posts: 12
Joined: Tue Sep 13, 2011 2:14 am

Re: Predicting path of a body/shape

Post 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!
User avatar
Taehl
Dreaming in associative arrays
Posts: 1025
Joined: Mon Jan 11, 2010 5:07 am
Location: CA, USA
Contact:

Re: Predicting path of a body/shape

Post by Taehl »

Box2D is non-deterministic, even with a fixed timestep?
Earliest Love2D supporter who can't Love anymore. Let me disable pixel shaders if I don't use them, dammit!
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
arahlf
Prole
Posts: 12
Joined: Tue Sep 13, 2011 2:14 am

Re: Predicting path of a body/shape

Post by arahlf »

I guess I'm not sure, I was just going off of what ivan said earlier.
arahlf
Prole
Posts: 12
Joined: Tue Sep 13, 2011 2:14 am

Re: Predicting path of a body/shape

Post by arahlf »

Actually with the constant time step the collisions seem to be consistent. Going to give the simulation a try w/ that :)
User avatar
ivan
Party member
Posts: 1915
Joined: Fri Mar 07, 2008 1:39 pm
Contact:

Re: Predicting path of a body/shape

Post 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.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Predicting path of a body/shape

Post 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.)
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 4 guests