networked graphics building networked virtual environments and networked games chapter 11: latency...
Post on 18-Jan-2018
233 Views
Preview:
DESCRIPTION
TRANSCRIPT
Networked GraphicsBuilding Networked Virtual Environments and Networked GamesChapter 11: Latency and Consistency
LATENCY IMPACT
ClientA ClientB
CarA A=1, V=0
CarB
A=1, V=0
CarA A=1, V=1
CarA A=1, V=2
CarA A=1, V=3
CarB
A=1, V=1
CarB
A=1, V=2
CarB
A=1, V=3
CarA CarB CarA CarB
Can’t apply open state
Door is Open & Locked
ClientA ClientB
Lock Door OpenDoor
Door is Closed & Unlocked
Door is Closed & Locked
Door is Closed & Unlocked
Door is Open & Unlocked
ClientA ClientBServer
Shooter (PlayerA)
Target (PlayerB)
ClientA ClientBServer
Shooter (PlayerA)
Target (PlayerB)
DUMB CLIENT AND LOCKSTEP SYNCHRONISATION
Quake ClientA
ReadInput
Rendering
Quake Server
ReceiveInput
Simulate
Quake ClientB
ReadInput
Rendering
MouseKeyboard
DrawLists, Game State
MouseKeyboard
DrawLists, Game State
CONSERVATIVE SIMULATIONS
Doom ClientA
ReadInput
Rendering
ReceiveInput
SimulateDoom ClientB
ReadInput
Rendering
Receive
Input
Simulate
Doom ClientC
ReadInput
Rendering
ReceiveInput
Simulate
ClientA
MessageI
Client=B Time=11.1
MessageI+1
Client=C Time=13.5
MessageI+2
Client=B Time=13.6
MessageI+3
Client=C Time=18.0
MessageI+4
Client=D Time=18.2
ClientB
ClientC
ClientD
Message Queue
TIME
EventExplode is delay at ClientC until after EventFire
ClientA
ClientB
ClientC
EventFire
EventExplode
ClientA
ClientB
ClientC
EventFire (0,1,0)
EventExplode (1,1,0)
EventFire (2,1,1)
EventExplode (2,1,0)
OPTIMISTIC ALGORITHMS
ClientA ClientB
Lock Door
OpenDoor
ClientC
AddZombies
RemoveZombies
CloseDoor
t0
t1
t2
t3
t4
CLIENT PREDICT AHEAD
ClientA Server
P0 P1
MoveP0 to P1
Move?P1 to P2
Move?P2 to P3
Move?P3 to P4
Move?P0 to P1
MoveP1 to P2
MoveP2 to P3
P2P1
P3P2
P4P3
P0 P1
P2P1
P3P2
ClientA Server
P0 P1
MoveP0 to P1
Move?P1 to P2
Move?P2 to P3
Move?P0 to P1
FailMoveP1 to Q1
FailMoveP1 to Q1
P2P1
P3P2
Q1
P0 P1
Q1P1
P3P2Q1
EXTRAPOLATION ALGORITHMS
1st Order Model
2nd Order Model
a) Player model sending three
updates
b) Ghost model path without
blending
to
t1
t2
c) Old ghost model and new ghost
model at t1
d) Blending between the old ghost and new ghost
over several frames
e) Ghost model path with blending
a) Old ghost position at t0, new ghost position at t0 and
new ghost position at t0+t
t0
New ghost t0+t
New ghost t0
Old ghost t0
b) Dotted line shows the planned path toreach the target position and direction
a) Player model showing the timings of dead-reckoning updates at the peaks of a periodic motion
Update at t0
Update at t1
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
Correct player model path
Convergence pathGhost model location at
t0
Player model update at t0
Extrapolation of player model
c) On the next update message the ghost model is out of phase with the player model. T
to
t1
Player model update at t1
a) Player model showing the object avoiding the
wall
Path of ghost model after update at t0
b) After the update at t1 the ghost model cannot
converge
2nd Order Model with Error Threshold
INTERPOLATION, PLAYOUT DELAYS AND LOCAL LAG
Sender Receiver
P1
P2
P3
P4
t1
t2
t3
t4
P0 P1 P2 P3
t0 t1 t2 t3
Interpolate P0→P1
Playout delay
Sender Receiver
P1
P2
P3
P4
t1
t2
t3
t4
t5
t6
t0 t1 t2 t3
Interpolate P0→P1
Maximum latency
P0 P1 P2 P3
Playout delay
Sender
ClientA
ClientB
t0 t1 t2 t3
Interval (Tα)
EA1
Playout delay (T)
ClientA
ClientB
ClientC
EC1 EC2
EB1 EB2
t4
PERCEPTION FILTERS
ClientAClientB
x position1.0
Tnetwork
Adde
d de
lay
Time
1.0
x po
sition
1.0 2.0
3.0 4.0
Time
1.0
x po
sition
1.0 2.0 3.0 4.0
a) Both clients’ view of the ball x position using temporal corrections
x position of ball as seen from ClientA
x position of ball as seen from ClientB
Time
1.0
x po
sition
1.0 2.0 3.0 4.0
b) Both clients’ view of the ball x position without using temporal corrections
x position of ball as seen from ClientB
x position of ball as seen from ClientA
REVEALING LATENCY
top related