Distributed Architecture
SDxWiki

Distributed Object State Updates

Assumptions:

(Actually, this system might be overkill for non-physical objects, since these game components likely will not have the same need for real-time updating. However, it might end up being very convenient for some types of non-physical objects. But in any case, it should be initially designed to serve the needs of the physical simulation.)

Definitions:

(Section on influencing distributed objects moved to a Think Tank page, Distributed Physical Modelling.)

Limiting Bandwidth usage

The basic description of Dead Reckoning requires a node to, essentially, simulate an owned object twice: once respecting all player input, and once without respect to player input since the last state update it sent to observers. When the divergence between the two simulated states diverges by a certain amount, a new state update is sent to observers.

In its basic form, this arrangement causes an owning node to send updates to all observers. In cases where bandwidth is precious, as is often the case on a player's node, sending multiple copies of an update is undesirable. Also, due to firewalls (and other network topology anomalies?), it can often be difficult for two arbitrary nodes to establish direct communications with each other. Instead, the updates could be sent to an upstream server node, which can then distribute them to interested observers. Application of this technique could potentially be conditional on bandwidth availability. (For initial implementation, I recommend use of this technique unconditionally.)

It is the nature of distributed object state updates that later ones completely supersede earlier ones. In order to alleviate transient network congestion, our distributed object services will be able to recognize that a state update is:

  1. associated with a particular, identifiable object
  2. associated with a particular time When a state update is queued for transmission, it will replace any earlier state updates for the same object. This allows state updates to be dropped before they are transmitted, if network congestion is causing delays.

A single error threshold might not be appropriate for all observers. Observers that are far away from an object don't need to simulate that object with the same level of precision that others do. Taking advantage of this fact could reduce network traffic considerably.

Thinking out loud. Effectively, make the server the only observer of a player node's owned objects, with an error threshold that is the minimum of all the real observers. The server, however, has multiple observers (the real observers) of it's simulation of the object. So as its simulation gets updated by the owning node, it will send out updates as needed to individual clients. This places the processing burden of evaluating multiple error thresholds on the server.