next up previous
: Object Placement : Additional Features : Transparent Pointer Resolution

Proactive Replication

As discussed in Section 4, the time required to discover an object of interest, contact its primary, and then retrieve the object replica may be too long for interactive game-play. Colyseus hides this latency by prefetching objects with predictive publications and subscriptions as described earlier. However, this solution does not work for short-lived objects such as missles in Quake II. Since missles objects are created unpredictably and exist for only several seconds, they cannot be efficiently prefetched.

To address this, the object manager provides two mechanisms to quickly replicate short-lived objects: First, short-lived objects may optionally publish their entirety (not just their naming attributes) via the Mercury lookup system. This allows nodes that are interested in these objects to pro-actively create a replica immediately after an object is discovered and not wait until they contact the primary. Second, we observed that short-lived objects in Quake II originate at locations very close to their creator (i.e., the object running the think-code that created the short-lived objects), so any node interested in the creator is also interested in the newly created objects. For example, a missile originates in the same location as the player that shot it. In this scenario, Colyseus allows a new object to ``attatch'' itself to another, so that any node which is interested in the later will automatically replicate the former, circumventing the discovery phase altogether.


next up previous
: Object Placement : Additional Features : Transparent Pointer Resolution
Ashwin Bharambe 平成17年3月2日