[ODE] dWorldStep() on non constant frame rate

Martin C. Martin martin at metahuman.org
Wed Dec 18 08:17:01 2002


Thomas Harte wrote:
> 
> By the way, if you are running the same simulation on multiple boxes and expecting to
> get the same results, you might be surprised since different brands of CPU (particularly
> in terms of intel vs Motorola, but also intel vs AMD, etc) can result in different levels of
> floating point accuracy, even for the same size of dReal,

Most multiplayer Real Time Strategy games simulate the entire world on
each machine, and only send mouse clicks between different machines.  They
simulate the world entirely in lockstep, where the same computations with
the same inputs *must* give the same results with exactly the same
rounding.  Perhaps surprisingly, this actually works, and someone with an
AMD can play again someone on an Intel without the worlds getting out of
sync.  I can guarantee you that "Star Trek: Armada" works that way, since
I worked on that game, and the motion of all units is done using floating
point computation (integration of a simple differential equation.)

Of course, if you use different compilers or different OSes, you'll get
different rounding.  But simply swapping AMD for Intel shouldn't do it. 
You may want to check & set the IEEE rounding mode though, as Thomas
suggested.

- Martin