23
Dead Reckoning Dead Reckoning Irwin Chiu Hau Irwin Chiu Hau Nicolas Ng Man Sun Nicolas Ng Man Sun

Dead Reckoning Irwin Chiu Hau Nicolas Ng Man Sun

Embed Size (px)

Citation preview

Page 1: Dead Reckoning Irwin Chiu Hau Nicolas Ng Man Sun

Dead ReckoningDead Reckoning

Irwin Chiu HauIrwin Chiu Hau

Nicolas Ng Man SunNicolas Ng Man Sun

Page 2: Dead Reckoning Irwin Chiu Hau Nicolas Ng Man Sun

OverviewOverview

IntroductionIntroduction SolutionSolution ModellingModelling ProgressProgress ConclusionConclusion

Page 3: Dead Reckoning Irwin Chiu Hau Nicolas Ng Man Sun

IntroductionIntroduction

Online Multiplayer GamesOnline Multiplayer Games• Multiple players/computers connected Multiple players/computers connected

via the Internetvia the Internet• e.g. Quake, Half Lifee.g. Quake, Half Life

Characteristics:Characteristics:• Players moving around rapidlyPlayers moving around rapidly• Powerful computersPowerful computers• Limited network capacityLimited network capacity

Page 4: Dead Reckoning Irwin Chiu Hau Nicolas Ng Man Sun

IntroductionIntroduction

Desired features:Desired features:• Minimize network trafficMinimize network traffic• Accurately portray other players’ Accurately portray other players’

movementmovement

DilemmaDilemma• Without frequent updates the local Without frequent updates the local

model does not know the current model does not know the current position of remote players.position of remote players.

Page 5: Dead Reckoning Irwin Chiu Hau Nicolas Ng Man Sun

OverviewOverview

IntroductionIntroduction SolutionSolution ModellingModelling ProgressProgress ConclusionConclusion

Page 6: Dead Reckoning Irwin Chiu Hau Nicolas Ng Man Sun

SolutionSolution

Dead reckoningDead reckoning• Approximate current position based on Approximate current position based on

past observationspast observations

Ship sailing in the ocean exampleShip sailing in the ocean example• Use the stars to determine locationUse the stars to determine location• What to do when it’s cloudyWhat to do when it’s cloudy

Page 7: Dead Reckoning Irwin Chiu Hau Nicolas Ng Man Sun

OverviewOverview

IntroductionIntroduction SolutionSolution ModellingModelling ProgressProgress ConclusionConclusion

Page 8: Dead Reckoning Irwin Chiu Hau Nicolas Ng Man Sun

ModelingModeling

Each player is an atomic DEVEach player is an atomic DEV• Moves at regular intervals independently of Moves at regular intervals independently of

other playersother players• Receives (external) updates about other Receives (external) updates about other

players’ position at undetermined times.players’ position at undetermined times. Each player “holds” a local Dead Each player “holds” a local Dead

Reckoning Model (also an atomic DEV) of Reckoning Model (also an atomic DEV) of other players.other players.

The network is also an atomic DEVThe network is also an atomic DEV• Models latency.Models latency.

Page 9: Dead Reckoning Irwin Chiu Hau Nicolas Ng Man Sun

ModelingModeling

Coupled DEVsCoupled DEVs

[player1] [DRM p1]

[network]

[player2] [DRM p2]

[DRM p2]

[DRM p1]

Page 10: Dead Reckoning Irwin Chiu Hau Nicolas Ng Man Sun

ModelingModeling

Local View

0

20

40

60

80

100

0 1 2 3 4 5

time

po

sit

ion

DRM

0

20

40

60

80

100

0 1 2 3 4 5

timep

os

itio

n

Zero order approximation with updates at regular intervals

Page 11: Dead Reckoning Irwin Chiu Hau Nicolas Ng Man Sun

Global View

0

20

40

60

80

100

0 1 2 3 4 5

time

po

siti

on

ModelingModeling

Zero order approximation with error threshold

error threshold

Page 12: Dead Reckoning Irwin Chiu Hau Nicolas Ng Man Sun

ModelingModeling

Local View

02468

101214

0 2 4 6

time

posi

tion

First order approximation with error threshold

DRM

02468

101214

0 2 4 6time

posi

tion

Page 13: Dead Reckoning Irwin Chiu Hau Nicolas Ng Man Sun

OverviewOverview

IntroductionIntroduction SolutionSolution ModellingModelling ProgressProgress ConclusionConclusion

Page 14: Dead Reckoning Irwin Chiu Hau Nicolas Ng Man Sun

ProgressProgress

What have we done?What have we done?• Object Sim ADEVSObject Sim ADEVS• Dead Reckoning ADEVSDead Reckoning ADEVS• Network ADEVSNetwork ADEVS

Object Sim DRM Network DRM

Computer 1 Computer 2

Page 15: Dead Reckoning Irwin Chiu Hau Nicolas Ng Man Sun

Object Sim ADEVSObject Sim ADEVS

Diagonal Diagonal MovementMovement• At time 0 to 2:At time 0 to 2:

v_x, v_y = 2v_x, v_y = 2• At time 3 to 4:At time 3 to 4:

v_x, v_y = 4v_x, v_y = 4• At time 5 to 6:At time 5 to 6:

• v_x, v_y = 6v_x, v_y = 6

Position

0

5

10

15

20

25

30

0 5 10 15 20 25 30

x

y

Position

Page 16: Dead Reckoning Irwin Chiu Hau Nicolas Ng Man Sun

Object Sim + DRObject Sim + DR

Diagonal Diagonal MovementMovement• At time 0 to 2:At time 0 to 2:

v_x, v_y = 2v_x, v_y = 2• At time 3 to 4:At time 3 to 4:

v_x, v_y = 4v_x, v_y = 4• At time 5 to 6:At time 5 to 6:

• v_x, v_y = 6v_x, v_y = 6

Position

0

5

10

15

20

25

30

0 2 4 6 8

x

y

Position

Remote Position

send

Page 17: Dead Reckoning Irwin Chiu Hau Nicolas Ng Man Sun

Dead Reckoning ADEVSDead Reckoning ADEVS InputInput

• From NetworkFrom Network• From high fidelity (or real) modelFrom high fidelity (or real) model

OutputOutput• To Graphics:To Graphics: High Refresh RateHigh Refresh Rate• To Network:To Network: SelectiveSelective

DR ADEVSIN

To Network

To Graphics

Page 18: Dead Reckoning Irwin Chiu Hau Nicolas Ng Man Sun

Network ADEVSNetwork ADEVS

BroadcastBroadcast Delayed NetworkDelayed Network

NetworkIN

Port N

Port 1

Page 19: Dead Reckoning Irwin Chiu Hau Nicolas Ng Man Sun

DR SystemDR System

Our current DR SystemOur current DR System Good results forGood results for

• Graphics view, DR view and Network Graphics view, DR view and Network UpdatesUpdates

NetworkTxDRM OutINObject Sim

Gra

phic

s

Page 20: Dead Reckoning Irwin Chiu Hau Nicolas Ng Man Sun

Plan / FutureworkPlan / Futurework

Player 1Player 1

Network

DRM 1INObject Sim

DRM 2Graphics

DRM NGraphics

Player 2

Player N

Page 21: Dead Reckoning Irwin Chiu Hau Nicolas Ng Man Sun

OverviewOverview

IntroductionIntroduction SolutionSolution ModellingModelling ProgressProgress ConclusionConclusion

Page 22: Dead Reckoning Irwin Chiu Hau Nicolas Ng Man Sun

ConclusionConclusion

Dead Reckoning = ApproximationDead Reckoning = Approximation

Advantages:Advantages:• Reduced network trafficReduced network traffic• Fluid animation in between updatesFluid animation in between updates

Dead Reckoning is used in almost Dead Reckoning is used in almost every distributed environment.every distributed environment.

Page 23: Dead Reckoning Irwin Chiu Hau Nicolas Ng Man Sun

ReferencesReferences

PythonDEVS PythonDEVS http://http://moncsmoncs..cscs..mcgillmcgill.ca/MSDL/research/projects/DEVS/.ca/MSDL/research/projects/DEVS/

PythonPython  http://www.python.org/http://www.python.org/

““Parallel And Distributed Simulation Parallel And Distributed Simulation Systems”, R. M. Fujimoto, PhDSystems”, R. M. Fujimoto, PhDGeorgia Institute of Technology.Georgia Institute of Technology.Chapter 7.5 – Dead ReckoningChapter 7.5 – Dead Reckoning