Networked Graphics Building Networked Virtual Environments and Networked
Networked Graphics Building Networked Virtual Environments and Networked Games Chapter 11: Latency and Consistency
LATENCY IMPACT
Car. A Car. B Car. A A=1, V=0 Car. B A=1, V=0 Car. A A=1, V=1 Car. B A=1, V=1 Car. A A=1, V=2 Car. B A=1, V=2 Car. A A=1, V=3 Car. B A=1, V=3 Client. A Client. B
Door is Closed & Unlocked Door is Closed & Locked Door is Closed & Unlocked Lock Door Open Door Can’t apply open state Door is Open & Unlocked Door is Open & Locked Client. A Client. B
Shooter (Player. A) Target (Player. B) Client. A Server Client. B
Shooter (Player. A) Target (Player. B) Client. A Server Client. B
DUMB CLIENT AND LOCKSTEP SYNCHRONISATION
Quake Client. A Read Input Mouse Keyboard Rendering Quake Server Receive Input Mouse Keyboard Simulate Draw Lists, Game State Quake Client. B Read Input Rendering Draw Lists, Game State
CONSERVATIVE SIMULATIONS
Doom Client. A Doom Client. C Read Input Receive Input Simulate Rendering Doom Client. B Read Input Receiv e Input Simulate Rendering
Client. A Client. B Message Queue Client. C Message. I+1 Message. I+2 Message. I+3 Message. I+4 Client=B Time=11. 1 Client=C Time=13. 5 Client=B Time=13. 6 Client=C Time=18. 0 Client=D Time=18. 2 Client. D
TIME
Event. Explode Client. A Client. B Event. Fire Client. C Event. Explode is delay at Client. C until after Event. Fire
Event. Explode (1, 1, 0) Client. A Client. B Client. C Event. Explode (2, 1, 0) Event. Fire (0, 1, 0) Event. Fire (2, 1, 1)
OPTIMISTIC ALGORITHMS
Lock Door t 0 Open Door t 1 t 2 Close Door Add Zombies Remove Zombies t 3 t 4 Client. A Client. B Client. C
CLIENT PREDICT AHEAD
Move? P 0 to P 1 P 0 P 1 Move? P 1 to P 2 P 1 P 2 P 3 P 4 Client. A Move P 0 to P 1 Move? P 2 to P 3 Move P 1 to P 2 Move? P 3 to P 4 Move P 2 to P 3 P 0 P 1 P 2 P 3 Server
Move? P 0 to P 1 P 0 P 1 P 2 P 3 Q 1 Client. A Move? P 1 to P 2 Move P 0 to P 1 Move? P 2 to P 3 Fail. Move P 1 to Q 1 P 1 Q 1 Fail. Move P 1 to Q 1 P 2 P 3 P 0 P 1 Server
EXTRAPOLATION ALGORITHMS
1 st Order Model
2 nd Order Model
t 2 t 1 to a) Player model sending three updates b) Ghost model path without blending c) Old ghost model and new ghost model at t 1
d) Blending between the old ghost and new ghost over several frames e) Ghost model path with blending
Old ghost t 0 New ghost t 0+t New ghost t 0 a) Old ghost position at t 0, new ghost position at t 0 and new ghost position at t 0+t b) Dotted line shows the planned path to reach the target position and direction
Update at t 0 Update at t 1 a) Player model showing the timings of dead-reckoning updates at the peaks of a periodic motion
Player model update at t 0 Extrapolation of player model Convergence path Correct player model path Ghost model location at t 0 b) On arrival of an update message, the ghost model plans to converge the current ghost model position with an extrapolation of the received position
c) On the next update message the ghost model is out of phase with the player model. T
t 1 to Path of ghost model after update at t 0 a) Player model showing the object avoiding the wall Player model update at t 1 b) After the update at t 1 the ghost model cannot converge
2 nd Order Model with Error Threshold
INTERPOLATION, PLAYOUT DELAYS AND LOCAL LAG
t 1 P 1 t 2 P 2 t 3 P 4 Sender t 4 Receiver
t 0 t 1 P 0 t 2 P 1 t 3 P 2 Interpolate P 0→P 1 Playout delay P 3
t 1 P 1 t 2 P 2 t 3 P 4 t 5 Sender t 6 Receiver
t 0 Sender t 1 P 0 t 2 P 1 t 3 P 2 P 3 Client. A Client. B Maximum latency Playout delay Interpolate P 0→P 1
t 0 Client. A Client. B t 1 t 2 EA 1 EB 2 EC 1 EC 2 Client. C Interval (Tα) Playout delay (T ) t 3 t 4
PERCEPTION FILTERS
Client. A Client. B
Added delay Tnetwork 1. 0 x position
x position 1. 0 2. 0 Time 3. 0 4. 0
1. 0 x position of ball as seen from Client. B x position of ball as seen from Client. A 1. 0 2. 0 3. 0 Time a) Both clients’ view of the ball x position using temporal corrections 4. 0
1. 0 x position of ball as seen from Client. A x position of ball as seen from Client. B 1. 0 2. 0 3. 0 Time b) Both clients’ view of the ball x position without using temporal corrections 4. 0
REVEALING LATENCY
- Slides: 44