Networked ODE

From ODE
Revision as of 21:16, 6 January 2019 by Russ (talk | contribs) (Created page with "== The Problem == Beyond the usual lag issues inherent to any networking application, and even if everything starts perfectly synchronized, when you simulate ODE on different...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The Problem

Beyond the usual lag issues inherent to any networking application, and even if everything starts perfectly synchronized, when you simulate ODE on different hardware, you'll eventually get different results. This is the same problem as with single-precision or double-precision ODE.

  • Different hardware has different precision, ie AMD and Intel machines have different FPU hardware: Intel can go to 80 bits doubles internally; AMD stays at 64 bits
  • Even though you can change the precision preferences on some hardware, math operations external to ODE (typically DirectX) can change the precision preferences and not switch it back for you

The Solution

  • When using ODE in a networked environment like a multiplayer game, you have to be very careful to have all aspects of the simulation perfectly identical, be wary of the timestep!
  • Be sure all your networking nodes are using the same precision. Double-check this. Some users reset the precision before each ODE step.
  • Have the server periodically send the entire world-state to the clients and have the clients re-sync

... could someone more knowledgeable continue?

P2P networking

... This is a dark and scary path, any hints?

Seems really hard problem to face; the fixed timestep of a simulation implies that all the peers should receive physics messages before the computation of a step. Discarding or losing messages immediately causes desynchronization. So the problem still persists even if we increase the timestep of the simulation, matching it with the average network delay. We could expect all going well multiplying time delivery of a message and the force applied to that body to obtain the same effect on all peers, obviously discarding messages that doesn't refer to that timestep, if it would be possible.

Links