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

Dead Reckoning

Embed Size (px)

DESCRIPTION

Dead Reckoning. Irwin Chiu Hau Nicolas Ng Man Sun. Overview. Introduction Solution Modelling Progress Conclusion. Introduction. Online Multiplayer Games Multiple players/computers connected via the Internet e.g. Quake, Half Life Characteristics: Players moving around rapidly - PowerPoint PPT Presentation

Citation preview

Page 1: Dead Reckoning

Dead ReckoningDead Reckoning

Irwin Chiu HauIrwin Chiu Hau

Nicolas Ng Man SunNicolas Ng Man Sun

Page 2: Dead Reckoning

OverviewOverview

IntroductionIntroduction SolutionSolution ModellingModelling ProgressProgress ConclusionConclusion

Page 3: Dead Reckoning

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

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

OverviewOverview

IntroductionIntroduction SolutionSolution ModellingModelling ProgressProgress ConclusionConclusion

Page 6: Dead Reckoning

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

OverviewOverview

IntroductionIntroduction SolutionSolution ModellingModelling ProgressProgress ConclusionConclusion

Page 8: Dead Reckoning

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

ModelingModeling

Coupled DEVsCoupled DEVs

[player1] [DRM p1]

[network]

[player2] [DRM p2]

[DRM p2]

[DRM p1]

Page 10: Dead Reckoning

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

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

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

OverviewOverview

IntroductionIntroduction SolutionSolution ModellingModelling ProgressProgress ConclusionConclusion

Page 14: Dead Reckoning

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

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

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

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

Network ADEVSNetwork ADEVS

BroadcastBroadcast Delayed NetworkDelayed Network

NetworkIN

Port N

Port 1

Page 19: Dead Reckoning

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

Plan / FutureworkPlan / Futurework

Player 1Player 1

Network

DRM 1INObject Sim

DRM 2Graphics

DRM NGraphics

Player 2

Player N

Page 21: Dead Reckoning

OverviewOverview

IntroductionIntroduction SolutionSolution ModellingModelling ProgressProgress ConclusionConclusion

Page 22: Dead Reckoning

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

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