Page 1 of 1

Scene Consistency

PostPosted: Fri Apr 17, 2015 2:04 am
by sprnk
I've been testing Algodoo for a short while now trying to determine whether or not a scene can be replayed multiple times and yield the exact same results. So far while testing this I create a Plinko-esque board and draw in Plinko chips, start the scene and make an observation of the distribution of the chips. I reset the scene by "undo-ing" the "start scene" command and then start the scene again without moving the chips or the board. I start the scene and, again, make an observation of the distribution, which more often than not is completely different from the previous test.
What gives?
If I haven't changed anything at all, shouldn't the results be exactly the same every time?

tl;dr: Unchanged scenes don't replay exactly the same every time. I'm looking for a way to replay a scene over and over again and get the same results.

Re: Scene Consistency

PostPosted: Fri Apr 17, 2015 9:18 am
by Kilinich
Intended. Possible step skip or collision force randomization.

Re: Scene Consistency

PostPosted: Fri Apr 17, 2015 10:19 pm
by sprnk
So there's no way to ensure consistency? Dang.

Re: Scene Consistency

PostPosted: Mon May 18, 2015 4:57 pm
by Anbang11
Sometimes, replaying a similar marble race scenes yields different winner/eliminated marble.

Re: Scene Consistency

PostPosted: Mon May 18, 2015 5:00 pm
by pnvv
What about this?

Rating: rated 5.6
Filesize: 38.06 kB
Comments: 9
Ratings: 2
download


Note - I'm not the one who built it.

Re: Scene Consistency

PostPosted: Tue May 19, 2015 7:59 am
by Anbang11
...Maybe it's not random enough lel.

Re: Scene Consistency

PostPosted: Thu May 21, 2015 8:23 pm
by electronicboy
Algodoo is a realtime physics simulator, thus certain corners and limits have to be met and steered clear of in order to ensure that the application is able to run in realtime. Computers have this magical unit called a FPU (Floating Point Unit) which is used to work with numbers such as 0.001, with the way an FPU works, you could try 0.001 + 0.001 and get out 0.001999847989; This is just a limit in CPUs, Algodoo takes measures such as rounding in order to limit the effect of such errors, however its impossible due to the way hardware works.

If you wanted an accurate simulation, you'd have to use a 'offline simulation program' which is a lot more accurate as it can re-calculate everything as needed to ensure accuracy, it doesn't matter if it takes 10 minutes to render a frame because of the number of objects it's processing, in a realtime application even 50ms for a frame is unacceptable.