the-butterfly-effect / tbe

The Butterfly Effect, a realistic physics simulation game
http://the-butterfly-effect.org
GNU General Public License v2.0
96 stars 13 forks source link

Simulation is not deterministic if many explosions #354

Open Wuzzy2 opened 4 years ago

Wuzzy2 commented 4 years ago

If a lot of dynamite explodes or a lot of cola bottles spill their cola everywhere, the simulation is no longer deterministic. If you repeat the exact same situation, you might get different results.

How to test

I have added a test level levels/test/test-dynamite-determinism.xml in the master branch to test this. Just start the simulation at normal, fast or ultra fast speed and look where the tennis ball will drop. Repeat the simulation multiple times.

EXPECTED: The tennis ball always ends up in the same spot ACTUAL: The tennis ball ends up in different spot

If you only use one dynamite, or the level is generally very simple, it seems to be deterministic.

Version

123d276534a73c8358a76850e2fe861456192826 in master