Hi all.
Me and my friend are developing a network game, and are very interested in this topic. So we made some tests.
By initializing only the random number generator or by only adding strictfp to every class, isn't enough to supply determinism.
But by using both, we achieved consistent results on the same machine, os and virtual machine.
At first, we were very happy.
So, for example, running two times the DominoTest provided in the Jbox2D testBed project, gave the same position and angle of every body for at least (we didn't check further) 500 steps on a Windows 7 64 bit running a 64bit sun's jvm.
But then we ran the same test on the 32 bit jvm and lost consistency with the output of the 64bit vm after the first 100 steps (certainly earlier since it was our first check).
We also ran tests on a linux 32bit distribution and 32bit jvm, but the results differed from both of the window's ones.
It seems that providing determinism is fairly easy on the same platform, but impossible when even a slight variation is made in the configuration. We would be very grateful to anyone who could spot an evident bias in our tests or provide further information on the matter.
Cheers!
[Edit]
Actually it was the DominoTower test.
Me and my friend are developing a network game, and are very interested in this topic. So we made some tests.
By initializing only the random number generator or by only adding strictfp to every class, isn't enough to supply determinism.
But by using both, we achieved consistent results on the same machine, os and virtual machine.
At first, we were very happy.
So, for example, running two times the DominoTest provided in the Jbox2D testBed project, gave the same position and angle of every body for at least (we didn't check further) 500 steps on a Windows 7 64 bit running a 64bit sun's jvm.
But then we ran the same test on the 32 bit jvm and lost consistency with the output of the 64bit vm after the first 100 steps (certainly earlier since it was our first check).
We also ran tests on a linux 32bit distribution and 32bit jvm, but the results differed from both of the window's ones.
It seems that providing determinism is fairly easy on the same platform, but impossible when even a slight variation is made in the configuration. We would be very grateful to anyone who could spot an evident bias in our tests or provide further information on the matter.
Cheers!
[Edit]
Actually it was the DominoTower test.