Professional Documents
Culture Documents
lack technology to achieve global synchronization long network latency high packet loss rate inconsistency of state view among participants
Network
Entities
Participant A
Participant B
Entity2
Synchronization preserves temporal and causal relationships among events happening at geographically distributed sites. Entity 1 shoots at entity 2 Entity1 Participant A at time 100ms. The message travels 50ms to Participant B reach entity 2 and 100ms to reach entity 3.
Entity3
Participant C
Entity 2 shoots at entity 3 at time 90ms. The message travels 70ms to reach entity1 and 40ms to reach entity 1.
Who is dead?
Games
MiMaze (a simple multi-player game based on IP/UDP/RTP protocol stack on the Mbone)
Client-server Architecture
Advantage It is easy to achieve consistency. Each participant can have the same state view by receiving the same data from the server.
Participant Participant
Participant
Disadvantage Server may become bottleneck. Nobody can play if server crashes. Participants are treated as dumb terminals.
Participants send actions to the server and the server sends updated entity states back for display.
Disadvantage
Participant
Participants talk with each other directly (not through the server). Entity states are updated in distributed places.
Three Observations
High reliability and strong consistency are not required for continuous entity states.
Continuous entity states are transmitted repeatedly. Only the most recent ones matter. No retransmission of lost entity states (similar to real time audio/video). Require global reference to resolve conflict of state update. However, global reference does not have to reside in a centralized place.
Continuous game play should not be disrupted by player joining and leaving.
Each entity has a owner. Only the owner of an entity can change its state. Every other participant updates the entity state by receiving information from its owner (subscribe and publish).
A new player joins in a session by contacting the master server. The master server finds a less busy server for the new participant to connect.
The new participant connects with the server. The server transfer game state and entity control to the new participant. Participant sends interacting events to the involved participant via unreliable unicast. Participant sends state updates of local entities to other participants via unreliable unicast or multicast.
Dead reckoning Dead reckoning reduces traffic and deals with loss of continuous entity state messages. The technique computes an entitys state based on its most recently received state.
Latency tolerance Latency tolerance is used to hide network delay. A fixed amount of delay is added to participants action.
Issue stop command at 200ms
Participant
300ms 330ms
transmission
Participant
Issue stop command at 230ms A fixed delay 100ms is added to every action. Assume that max one way transmission time + process overhead < 100ms
P1
1 4 2
P3
P4
P2
1 P3 subscribes to some entity controlled by P1.