Computer Networked games 4 Another form of multimedia

  • Slides: 24
Download presentation
Computer Networked games 4 Another form of multimedia traffic – audio, video and interactive

Computer Networked games 4 Another form of multimedia traffic – audio, video and interactive 4 Slides courtesy – Mark Claypool @ WPI 2/28/2021 CSE 40373/60373: Multimedia Systems page 1

Game Types 4 First Person Shooters < Doom, Quake, Counter-strike, … 4 Massive Multi-Player

Game Types 4 First Person Shooters < Doom, Quake, Counter-strike, … 4 Massive Multi-Player Online Role Playing < Everquest, Earth and Beyond, … 4 Real-Time Strategy < Warcraft, Starcraft … 4 Other < Misc – not any genre above = Example: Diablo 2, Racing, … < Non-networked = Example: Thief < Multiplayer, but relaxed real time = Example: Chess, Bridge 2/28/2021 CSE 40373/60373: Multimedia Systems page 2

What is Network Latency? Game client • 3 Internet Latency - time to get

What is Network Latency? Game client • 3 Internet Latency - time to get from source to destination – There and back (round-trip time) 2/28/2021 CSE 40373/60373: Multimedia Systems Game server page 3

Why Does Latency Matter? User Input Message: User Input Response time Render Input Message:

Why Does Latency Matter? User Input Message: User Input Response time Render Input Message: Ok User Input Process and Validate Input Time Affects responsiveness 2/28/2021 CSE 40373/60373: Multimedia Systems page 4

Example of Unresponsiveness Player is pressing left Player is pressing up Running back goes

Example of Unresponsiveness Player is pressing left Player is pressing up Running back goes out of bounds! Player curses 2/28/2021 CSE 40373/60373: Multimedia Systems page 5

Why Does Latency Matter? 4 Affects consistency Response time User Input Render Input Fix

Why Does Latency Matter? 4 Affects consistency Response time User Input Render Input Fix Up Message: User Input Message: Ok with Update Process and Validate Input Time 6 2/28/2021 CSE 40373/60373: Multimedia Systems page 6

Example of State Inconsistency 2/28/2021 CSE 40373/60373: Multimedia Systems page 7

Example of State Inconsistency 2/28/2021 CSE 40373/60373: Multimedia Systems page 7

Why Does Latency Matter? Message: Treasure! User Input Message: Treasure! Message: Get treasure User

Why Does Latency Matter? Message: Treasure! User Input Message: Treasure! Message: Get treasure User Input Message: Ok Message: Tough luck! Time Affects fairness 8 2/28/2021 CSE 40373/60373: Multimedia Systems page 8

How Much Does Latency Matter? Depends upon precision of task 2/28/2021 CSE 40373/60373: Multimedia

How Much Does Latency Matter? Depends upon precision of task 2/28/2021 CSE 40373/60373: Multimedia Systems page 9

How Much Does Latency Matter? Depends upon deadline of task 10 2/28/2021 CSE 40373/60373:

How Much Does Latency Matter? Depends upon deadline of task 10 2/28/2021 CSE 40373/60373: Multimedia Systems page 10

Precision and Deadline Higher Precision Lower Third-Person Avatar Running Shooting Machine Gun Casting Area

Precision and Deadline Higher Precision Lower Third-Person Avatar Running Shooting Machine Gun Casting Area Spell Exploring Shooting Grenades Fighting First-Person Avatar Racing Shooting Sniper Tighter 11 Omnipresent 2/28/2021 Combat Moving Drinking Health Potion Deadline CSE 40373/60373: Multimedia Systems Building Looser page 11

Player Performance vs. Latency 2/28/2021 CSE 40373/60373: Multimedia Systems page 12

Player Performance vs. Latency 2/28/2021 CSE 40373/60373: Multimedia Systems page 12

Latency Compensation - Time Delay 4 Server delays processing of events < Wait until

Latency Compensation - Time Delay 4 Server delays processing of events < Wait until all messages from clients arrive 4 Server also sends messages to more distant client first, delays messages to closer Client 1 command arrives Server processes Client 2 command arrives both client commands Time Delay Disadvantage – decreases responsiveness to that of player with highest latency 2/28/2021 CSE 40373/60373: Multimedia Systems page 13

Latency Compensation - Time Warp 4 Server rolls-back (warps) to when action taken place

Latency Compensation - Time Warp 4 Server rolls-back (warps) to when action taken place on client Disadvantage – user may notice when fix state inconsistency 2/28/2021 CSE 40373/60373: Multimedia Systems page 14

Computer Networks… 4 Brief overview of computer networks and how it plays into multimedia

Computer Networks… 4 Brief overview of computer networks and how it plays into multimedia 4 Network types: < Circuit switched: e. g. , telephone lines = Dedicated link. Have enough bandwidth for a telephone call whether we say anything on the line or not. This is good if we don’t use any compression, wasteful if we use any compression (silence can be easily eliminated) < Packet switched: modern computer networks = Data is packaged into packets which are individually routed across the network. – Slightly wasteful because each packet carries identity and destination information. Not as bad as sending (say) a 1000 byte packet as opposed to 1 byte packet – Packets compete for network resources leading to harder to predict networking 2/28/2021 CSE 40373/60373: Multimedia Systems page 15

Packet switched connection models 4 TCP – reliable, in-order at most once delivery <

Packet switched connection models 4 TCP – reliable, in-order at most once delivery < Eases developer effort to manage reliability < Network retransmits data to ensure in-order delivery = Multimedia applications can either tolerate dropped packets or desire to stay abreast of live stream rather than wait for stragglers < TCP traverses home routers/firewalls in the reverse direction (outside to inside) better than UDP, especially on cheap routers. Hence, TCP remains a viable option for games < TCP internally buffers data to achieve efficiency, sending 1 byte packets might be collected to become a 1000 byte packet – unacceptable for multimedia (games) 2/28/2021 CSE 40373/60373: Multimedia Systems page 16

UDP 4 Data gram protocol – no guarantees of order of delivery or reliability

UDP 4 Data gram protocol – no guarantees of order of delivery or reliability < Multimedia applications have full control over what to transmit and when. They also have control over dropped packets. For example, I frames might be retransmitted or forward corrected, lost B frames might be ignored etc. 2/28/2021 CSE 40373/60373: Multimedia Systems page 17

Networks strive for fairness 4 Assuming we want to support ‘n’ network flows over

Networks strive for fairness 4 Assuming we want to support ‘n’ network flows over a network link of capacity ‘m’ < Approach 1: reserve equally, say n/m per flow or proportional to flow requirements = Wasteful if flow doesn’t use a particular allocation – Sharing can help customers even though ISP get paid < Approach 2: Best effort = Each flow can be aggressive and pump as much as they possibly can. Network will experience congestion and drop packets. You will get the best of what can be supported = Each flow can be “nice”. One form of niceness is TCP friendly. TCP internally probes the network bandwidth using additive increase multiplicative decrease (AIMD) scheme. It increases the amount of data slowly in additive fashion till it experiences congestion (packet drop). At that point, it drops quickly and tries again to calculate the bottle neck bandwidth in a distributed fashion������ 2/28/2021 CSE 40373/60373: Multimedia Systems page 18

Multimedia traffic 4 Isochronous traffic: somewhere between synchronous (constant traffic) and asynchronous (unpredictable). Sort

Multimedia traffic 4 Isochronous traffic: somewhere between synchronous (constant traffic) and asynchronous (unpredictable). Sort of predictable, sort of bursty < Peak burst not necessarily equal to the network capacity (unlike for file transfer application which can use as much bandwidth as you can throw at it). < Traffic bursty and will interact with TCP traffic that are competing for resources < 2/28/2021 CSE 40373/60373: Multimedia Systems page 19

Microsoft Media 4 Packets arrive at fairly regular intervals 4 Large packets (up to

Microsoft Media 4 Packets arrive at fairly regular intervals 4 Large packets (up to 16 KB): Uses network fragmentation < Losing one fragment loses the entire packet < Fragments arrive back to back = can assist adaptation policy 4 Lossy network - adapts to a low quality stream < fragmentation makes this effect worse 2/28/2021 CSE 40373/60373: Multimedia Systems page 20

Real 4 Variable packet size (50 -1500 bytes) < Packet arrivals almost regular <

Real 4 Variable packet size (50 -1500 bytes) < Packet arrivals almost regular < Packets sent closer to each other 4 Packet size less than MTU < No network level fragmentation 4 Lossy networks - lower quality video 2/28/2021 CSE 40373/60373: Multimedia Systems page 21

Quicktime 4 Variable packet size < Packets sent in “clusters” – burst and extended

Quicktime 4 Variable packet size < Packets sent in “clusters” – burst and extended idle = Application level fragmentation? 4 Packet size less than MTU < No network fragmentation 4 Lossy networks – lower quality video 2/28/2021 CSE 40373/60373: Multimedia Systems page 22

Networking technologies - wired 4 Ethernet: modern Ethernet 100 Mbps or 1 Gbps <

Networking technologies - wired 4 Ethernet: modern Ethernet 100 Mbps or 1 Gbps < Switched, full duplex and so no congestion < No notion of bandwidth reservation < Network is bounded by the packet processing duration, small packets require more per packet overhead (not amortized over the size of the packet) 2/28/2021 CSE 40373/60373: Multimedia Systems page 23

Network technologies 4 ATM – allows for bandwidth reservation. ISPs love technology but for

Network technologies 4 ATM – allows for bandwidth reservation. ISPs love technology but for the most part, relegated to fringe networks. 4 Wide area networks < Iptv topology – courtesy Misha Rabinovich @CWRU 2/28/2021 CSE 40373/60373: Multimedia Systems page 24