190 likes | 343 Views
The Technology of the Game -Latency and Online Games. Associate Professor Computer Science. Director Interactive Media and Game Development. Mark Claypool. Worcester Polytechnic Institute. Software Engineering Human-Computer Interaction Computer Architecture Databases
E N D
The Technology of the Game -Latency and Online Games Associate Professor Computer Science Director Interactive Media and Game Development Mark Claypool Worcester Polytechnic Institute
Software Engineering Human-Computer Interaction Computer Architecture Databases Graphics and Animation Artificial Intelligence Computer Networks Harvard Interactive Media Group
Outline • Introduction (done) • What is latency? (next) • Why does it matter? • How much does it matter? • What can be done? Harvard Interactive Media Group
Game client Internet Game server What is Network Latency? • Latency - time to get from source to destination • There and back (round-trip time) Harvard Interactive Media Group
User Input Process and Validate Input Message: User Input Response time Message: Ok User Input Render Input Time Why Does Latency Matter? Affects responsiveness Harvard Interactive Media Group
Player is pressing left Player is pressing up Running back goes out of bounds! Player curses Example of Unresponsiveness Harvard Interactive Media Group
User Input Process and Validate Input Message: User Input Render Input Response time Message: Ok with Update Fix Up Time Why Does Latency Matter? Affects consistency Harvard Interactive Media Group
Example of State Inconsistency Harvard Interactive Media Group
Message: Treasure! Message: Treasure! User Input Message: Get treasure User Input Message: Get treasure Message: Ok Message: Tough luck! Time Why Does Latency Matter? Affects fairness Harvard Interactive Media Group
How Much Does Latency Matter? Depends upon precision of task Harvard Interactive Media Group
How Much Does Latency Matter? Depends upon deadline of task Harvard Interactive Media Group
Third-Person Avatar Omnipresent First-Person Avatar Precision and Deadline Lower Casting Area Spell Running Exploring Shooting Grenades Precision Shooting Machine Gun Fighting Combat Racing Moving Higher Drinking Health Potion Shooting Sniper Building Deadline Tighter Looser Harvard Interactive Media Group
Player Performance vs. Latency Harvard Interactive Media Group
Outline • Introduction (done) • What is latency? (done) • Why does it matter? (done) • How much does it matter? (done) • What can be done? (next) • Time Manipulation Harvard Interactive Media Group
Latency Compensation - Time Delay • Server delays processing of events • Wait until all messages from clients arrive • Server also sends messages to more distant client first, delays messages to closer Server processes both client commands Client 1 command arrives Client 2 command arrives Time Time Delay Disadvantage – decreases responsiveness to that of player with highest latency Harvard Interactive Media Group
Latency Compensation - Time Warp • Server rolls-back (warps) to when action taken place on client Disadvantage – user may notice when fix state inconsistency Harvard Interactive Media Group
The Technology of the Game -Latency and Online Games Associate Professor Computer Science Director Interactive Media and Game Development Mark Claypool Worcester Polytechnic Institute
References • Valve Developer Community. “Source Multiplayer Networking”, Online at: http://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking • Mark Claypool and Kajal Claypool. “Latency and Player Actions in Online Games”, Communications of the ACM, Volume 49, Issue 11, November 2006. Online at: http://www.cs.wpi.edu/~claypool/papers/precision-deadline/ • James Nichols and Mark Claypool. “The Effects of Latency on Online Madden NFL Football”, In Proceedings of the 14th ACM International Workshop on Network and Operating Systems Support for Digital Audio and Video (NOSSDAV), Kinsale, County Cork, Ireland, June 16-18, 2004. Online at: http://www.cs.wpi.edu/~claypool/papers/madden/ • Grenville Armitage, Mark Claypool, and Philip Branch. “Networking and Online Games: Understanding and Engineering Multiplayer Internet Games”, John Wiley and Sons, Ltd., June 2006. ISBN 0470018577. Online at: http://www.cs.wpi.edu/~claypool/papers/book/ Harvard Interactive Media Group