Time Manipulation.  The game states rendered at the clients are different because latency is dependent on the location of the client from the server.

Slides:



Advertisements
Similar presentations
Introduction to Networked Graphics Latency Compensation.
Advertisements

Game Programming Patterns Game Loop
Dead Reckoning Objectives – –Understand what is meant by the term dead reckoning. –Realize the two major components of a dead reckoning protocol. –Be capable.
Movement Planning. After 90 grueling minutes of regulation and 30 minutes of overtime, the score was tied: USA 0, China 0. The 1999 Woman’s Soccer World.
Cheat-Proof Playout for Centralized and Distributed Online Games IEEE InfoCom’01 Paper by Nathaniel E. Baughman and Brian Neil Levine CPSC 538A Presentation:
Comp Spring 2003 Delay Jitter Ketan Mayer-Patel.
IEEE Virtual Reality 2011 Introduction to Networked Graphics Anthony Steed Part 3: Latency Scalability.
Network synchronization of Online Games Li, Zetan.
Decision Making.
Chapter 6 Errors, Error Detection, and Error Control
1 By: Christopher Burgess (CS) and Nathan Roy (IMGD) Advisor: Mark Claypool.
Chapter 6 Errors, Error Detection, and Error Control.
Dead Reckoning Andrew Williams. Dead reckoning Process of estimating a position using known information from the (recent) past. If you know the speed.
IP Telephony Project By: Liane Lewin Shahar Eytan Guided By: Ran Cohen - IBM Vitali Sokhin - Technion.
The Technology of the Game - Latency and Online Games Mark Claypool Associate Professor Computer Science Director Interactive Media and Game Development.
Sync-MS: Synchronized Messaging Service for Real-Time Multi-Player Distributed Games By Yow-Jian Lin, Katherine Guo and Sanjoy Paul Presented by Greg Kempe.
1 Chapter Six - Errors, Error Detection, and Error Control Chapter Six.
Latency Compensating Methods in Client/Server In-game Protocol Design and Optimization I’m Curtis.
Bullet Time Effect with Local Perception Filters (danny perry)
Packet audio playout delay adjustment Performance bounds and algorithms Moon, Kurose, Towsley.
Chapter 6 Errors, Error Detection, and Error Control
Linear Momentum Lecturer: Professor Stephen T. Thornton
Lecture 12 Synchronization. EECE 411: Design of Distributed Software Applications Summary so far … A distributed system is: a collection of independent.
State Machines CS 614 Thursday, Feb 21, 2002 Bill McCloskey.
Error Checking continued. Network Layers in Action Each layer in the OSI Model will add header information that pertains to that specific protocol. On.
CS Spring 2012 CS 414 – Multimedia Systems Design Lecture 34 – Media Server (Part 3) Klara Nahrstedt Spring 2012.
Multiplayer Online Games
Chapter 1 The Challenges of Networked Games. Online Gaming Desire for entertainment has pushed the frontiers of computing and networking technologies.
Logical Clocks (2). Topics r Logical clocks r Totally-Ordered Multicasting r Vector timestamps.
MODULE IV SWITCHED WAN.
On the Anonymity of Anonymity Systems Andrei Serjantov (anonymous)
E0262 MIS - Multimedia Playback Systems Anandi Giridharan Electrical Communication Engineering, Indian Institute of Science, Bangalore – , India.
A 2-D, multi-player tank game developed in PLT Scheme ~ ~ ~ Ben VandenBos, Tim Reeves, Justin Hall, and John Ericksen ~ ~ ~ Senior Project - CS496 Spring.
Computing hardware CPU.
Network Physics Created by Ruslan Yavdoshak for Nikitova Games, 2008.
Introduction to Networked Graphics Part 3 of 5: Latency.
Recap. 1. Acceleration due to gravity “g” near the earth’s surface is CONSTANT (i.e., NOT varying with TIME) and has a value of 9.8 m/s An object.
Warcraft III, by Blizzard CSE 381 – Advanced Game Programming Networked Gaming Issues.
Chapter 12 Transmission Control Protocol (TCP)
CSC 311 Chapter Eight FLOW CONTROL TECHNIQUES. CSC 311 Chapter Eight How do we manage the large amount of data on the network? How do we react to a damaged.
1 Chapter Six - Errors, Error Detection, and Error Control Chapter Six.
Data Communications & Computer Networks, Second Edition1 Chapter 6 Errors, Error Detection, and Error Control.
Chapter 6: Errors, Error Detection, and Error Control Data Communications and Computer Networks: A Business User’s Approach Third Edition.
Copyright 2008 Kenneth M. Chipps Ph.D. Controlling Flow Last Update
Improving application layer latency for reliable thin-stream By: Joel Fichter & Andrew Sitosky Src:
Copyright © Lopamudra Roychoudhuri
Networked Graphics Building Networked Virtual Environments and Networked Games Issues in Networking Graphics.
Networked Games Objectives – –Understand the types of human interaction that a network game may provide and how this influences game play. –Understand.
Dead Reckoning. Outline Basic Dead Reckoning Model (DRM) –Generating state updates –Position extrapolation Refinements –Time compensation –Smoothing.
Replication (1). Topics r Why Replication? r System Model r Consistency Models r One approach to consistency management and dealing with failures.
Game Programming Patterns Game Loop From the book by Robert Nystrom
Warlords Patrick Levoshko SE 558 – Multiplayer Game Design.
Unit III Bandwidth Utilization: Multiplexing and Spectrum Spreading In practical life the bandwidth available of links is limited. The proper utilization.
High Level Architecture Time Management. Time management is a difficult subject There is no real time management in DIS (usually); things happen as packets.
TCP continued. Discussion – TCP Throughput TCP will most likely generate the saw tooth type of traffic. – A rough estimate is that the congestion window.
Networked Graphics Building Networked Virtual Environments and Networked Games Chapter 11: Latency and Consistency.
Mon. Jan. 28 – Physics Lecture #4 Relativity – Basic Postulates 0) Quiz 1) Basic Postulates 2) Relative velocities 3) Light Clocks 4) Comparing time between.
Data Link Layer Flow and Error Control. Flow Control Flow Control Flow Control Specifies the amount of data can be transmitted by sender before receiving.
Packet switching Monil Adhikari. Packet Switching Packet switching is the method by which the internet works, it features delivery of packets of data.
Distributed Error- Confinement Shay Kutten (Technion) with Boaz Patt-Shamir (Tel Aviv U.) Yossi Azar (Tel Aviv U.)
Mutual Exclusion Algorithms. Topics r Defining mutual exclusion r A centralized approach r A distributed approach r An approach assuming an organization.
Multiplayer Online Games
Parallel and Distributed Simulation
Virtual World Architecture II
Algorithms for Selecting Mirror Sites for Parallel Download
Lecture 18: Coherence and Synchronization
Error Checking continued
Presentation transcript:

Time Manipulation

 The game states rendered at the clients are different because latency is dependent on the location of the client from the server and network state along different paths  When the same response reaches players at different times, there is an unfairness factor introduced in the game.  Two efficient techniques for handling this manipulation are Time Delay or Playout Delay and Time Warp or Roll Back.

Play Out Delay in Multi Media  Playout delay is a mechanism used in the audio and video worlds to smooth out network delays and jitter.  A smoothing buffer is used to store several frames of data at a receiver and playout of the data lags the original time of the event.  Size of buffer (i.e., delay/lag): The larger the smoothing buffer, the better the output (less jerkiness) but impacts interactivity as one user lags the other.  Too large: can be very annoying, e.g., in audio conversations -> users talk through each other.  Too small: may not be able to hide jitter.

Time Delay C/S Model – S Side  An artificial delay is introduced when processing player updates to equalize latency at the server.  Received actions placed in a buffer and processed with a short delay. Delay chosen to allow all clients actions to arrive at “S”  Instead of processing a “nearby” client’s action upon receiving it, the server purposely introduces a delay in processing the request, allowing more time for remote clients’ actions to the current game state to arrive.  The game state updates sent by the server can also be delayed in being sent out,  send the response to a client that is far away before sending the response to a client that is closer  This technique ensures that all clients have the same effective latency in the game world at the server – consistent game view

Time Delay C/S Model – C Side  The clients themselves can introduce buffering to equalize latency  client that is closer to the server delays processing of the server response while client which is further away processes the response immediately.  Used in peer to peer (P2P), where each client waits for all other clients’ actions – called bucket synchronization.  Client side playout delay is sometimes referred to as a form of conservative simulation.

t0t0 t1t1 t2t2 t3t3 Interval (Tα) E A1 Playout delay (T  ) Client A Client B Client C E C1 E C2 E B1 E B2 t4t4 In P2P: Bucket Synchronization

Impact of Time Delay/Play out Delay  Buffering of received data works towards equalizing the latency among various clients, BUT it can make the game play less responsive.  Size of buffer (i.e., delay/lag): The larger the smoothing buffer, the better the output (consistent state space, fairer) but impacts interactivity/responsiveness as client lags the player.  Too large: can be very annoying.  Too small: may not be able to counter the network latency/jitter.

Time Warp or Roll Back  Server rolls back or time warps the events in a game to a time when a far away or delayed client action took place and was sent. For example:  player 1 shoots at player 2 at time t 0,  the time the message arrives at the server is t 3,  player 2 moved at time t 1 which was received at the server at time t 2  t 0 Server concludes that player 2 moved at t 2 and was not shot by player 1  BUT when server checks all the timestamps it realizes the discrepancy. It uses the time warp technique and rolls back the events it had processed, i.e.,  player 2 moved at t 2 and NOT dead IS WRONG  INSTEAD player 2 DEAD since player 1 acted earlier – i.e., at t 0  In this case, the server will determine that the older event (shooting by player 1) has a bearing on a subsequent event (death of player 2. Server changes the OUTCOME to make the global game state consistent/accurate -> server will determine that player 1 hit and killed player 2, as the opponent’s movement at time t 1 was invalid since it occurred after t 0 even though it was received at time t 2 which was before time t 3

Time Warp Cont’d  Figure shows a screenshot of a Half Life 2 server.  Round-trip latency to the client ms, meaning the user’s commands are executed 100 ms before the screenshot.  Red boxes show the target position on the client where it was 100 ms ago.  Since then, the target moved to the left while the user’s command was travelling over the network to the server. Actual soldier graphic.  When the user command arrives at the server, the server rolls back time (time warp) to put the target in the position it was at the time the user made the shot, indicated by the blue boxes.  The server determines there was a hit (the clients see blood from the wounds).

Time Warp Shortcomings  Disruptive gameplay  Suppose a player places the cross-hairs of a gun on an opponent and fires. But message was delayed.  In the meantime the opponent moved, perhaps even around a corner and out of sight.  The server, using time warp, will ultimately determine this is a “hit”.  Inconsistency: It will seem to the opponent that the bullets actually went around the corner!!!!!

Time Warp contd  General Algorithm for the Server:  Receive packet from client  Extract information (user input)  Elapsed time = current time – latency to client  Rollback all events in reverse order to current time – elapsed time  Execute user command  Repeat all events in order, updating any clients that are affected  Repeat  For Time Warp it is critical to have an accurate measurement of the latency between a client and a server so that the game time can be rolled back the exact amount of time.

INTERPOLATION, PLAYOUT DELAYS AND LOCAL LAG

Interpolation  Extrapolation is tricky, so why not just interpolate?  Just delay all received information until there are two messages, and interpolate between them  Only adds delay equal to the time between sending packets

SenderReceiver P1P1 P2P2 P3P3 P4P4 t1t1 t2t2 t3t3 t4t4 One Frame Delay and Interpolation

P0P0 P1P1 P2P2 P3P3 t0t0 t1t1 t2t2 t3t3 Interpolate P 0 →P 1 Playout delay Two Frame Delay and Interpolation

Non-Linear Interpolation  Need to consider several aspects  Object movement is not linear, so could use quadratic, cubic, etc. by keeping three or more updates

SenderReceiver P1P1 P2P2 P3P3 P4P4 t1t1 t2t2 t3t3 t4t4 t5t5 t6t6 Two frame Delay and Non-Linear Interpolation P 1, P 2 and P 3 movement P 2, P 3 and P 4 movement

t0t0 t1t1 t2t2 t3t3 Interpolate P 0 →P 1 Maximum latency P0P0 P1P1 P2P2 P3P3 Playout delay Sender Client A Client B Accommodating for Furthest Client - Playout Delay

PERCEPTION FILTERS

Local Perception and Playout Delay  So far assumed that events should be displayed asap on clients.  However, with moving objects, when they are further away, they move slower, but as they get closer they move faster.  So objects closer should have low playout delay and objects far away should have longer playout delay.

Perception Filters  In these techniques, the progress of time is altered at different clients  Clients choose to predict ahead or delay playout depending on the meaning and their expected interaction

Using P2P Pong as an example  The ball’s motion is predictable. Each client extrapolates the ball’s position, using their own physics engine (on local device) or motion prediction algorithm.  Each client is programmed only to alter the ball’s trajectory on impact.  The bouncing of the ball off the paddle is sent via a message to the opponent. This transmission could take some time: T network.  So opponent will react later than perceived by the player and the ball will appear as if it flew by the paddle instead of being hit.

Client A Client B Client A at X=0 Client B at X=1 X=0 X=1

Time 1.0 x position b) Both clients’ view of the ball x position without using temporal corrections x position of ball as seen from Client B x position of ball as seen from Client A

Velocity of Ball on Client A  When ball leaves the paddle, the ball needs to be slowed down on the client’s machine taking into account the network lag.  The distance between two paddles is assumed to be one unit, A at x=0, and B at x=1.  V x = velocity of the ball, secs/unit. So 1/V x = time in “units” to cross the Pong board.  Actual time it takes to cross is T = T network + 1/V x  So velocity according to A is:  V’= 1/T = Vx/(1 + (T network x Vx) - SLOWER

Velocity of Ball on Client B  When the ball comes back again, it needs to be sped up to makeup for the lost time when traveling away.  V”= V x /(1 - (T network x V x ) So velocity according to B is FASTER  Round trip to cross = 2/V x. Doesn’t change.  The network lag changes the perception with speed.

Time 1.0 x position

Time 1.0 x position a) Both clients’ view of the ball x position using temporal corrections x position of ball as seen from Client A x position of ball as seen from Client B

Time 1.0 x position b) Both clients’ view of the ball x position without using temporal corrections x position of ball as seen from Client B x position of ball as seen from Client A

Latency Compensation and Cheating The anonymity factor in online games means there are many opportunities for cheating. Some of the latency compensation techniques while reducing the effect of latency introduce more opportunities for cheating.

Latency Compensation and Cheating (Cont.)  Cheating Opportunity Examples:  With opponent prediction there is no need for a server! But that can only work in “trusted” environments where players know each other.  With time warp, a client could interfere with measurements about round-trip time, making the server believe the client is further away than it actually is. This would allow the client to respond to events that, in essence, happened in the past and hence giving unfair advantage.  With time delay, a client with slow reflexes could claim a higher latency than it actually has, causing a large time delay at the server, thus neutralizing the better reflexes that opponents may have.  Server Control:  For massive online gaming there is a need of an authoritative server which confirms or refutes inappropriate client requests and actions and also keeps track of the exact time delay between the server and each client.