introduction 1 of 2
play

Introduction (1 of 2) Games are increasingly networked - PDF document

4/10/2017 Introduction (1 of 2) Games are increasingly networked Multi-player, connecting PCs and Game consoles (e.g., Counter-strike, Halo) Single-player, pulling and pushing content to Web Networking for Games service (e.g.,


  1. 4/10/2017 Introduction (1 of 2) • Games are increasingly networked – Multi-player, connecting PCs and Game consoles (e.g., Counter-strike, Halo) – Single-player, pulling and pushing content to Web Networking for Games service (e.g., Kongregate) • Emerging services play game in “cloud”, sending rendered game down as video IMGD 4000 – (However, will not talk about this approach much) • All require an understanding of networking (conversant), with enough knowledge to begin to design and build network game (develop) Slide 2 Introduction (2 of 2) Networking at WPI • For now, “networking” mostly means “Internet • • General, core networks: Also grad courses networking”, so that will be our reference CS 3516 – Computer Networks CS 513 – Introduction to Local and – Broad view of computer networks, Wide Area Networks • Other networking aspects that can be relevant for top-down CS 528 – Mobile and Ubiquitous CS 4516 – Advanced Computer Computing games includes: Networks CS 529 – Multimedia Networking – Ad Hoc / Mesh networking – In-depth computer networks, more CS 530 – High-Performance “under the hood” Networks – Short-range wireless (e.g., Bluetooth) • Networks applied to specific CS 533 – Modeling and Performance domains – Network security (including cheating) Evaluation of Network and CS 4513 – Distributed Systems Computer Systems – Mobile application (game) development (often networked) CS 4518 – Mobile and Ubiquitous CS 558 – Computer Network Computing Security • These, and other topics available in-depth from your CS 4241 – Webware: Computational CS 577 – Advanced Computer and Technology for Network Information friendly, neighborhood WPI course Communications Networks Systems CS 4404 – Tools and Techniques in (next slide) Computer Network Security This deck  core networking applied to computer games. Slide 3 Slide 4 The Internet – Postal Service Analogy The Internet – Postal Service Analogy DNS lookup Transmit (e.g., Make packet Send packet WiFi) to router from data Route packet (actually, hop • Lookup address • Lookup address by hop) Transmit (e.g., fiber) across continent Deliver packet Transmit (e.g., Check Extract data Ethernet) credentials from packet Slide 5 (e.g., firewall) Slide 6 1

  2. 4/10/2017 Outline The Internet • Many design decisions and end-user experiences • Introduction (done) for multi-player networked games derive from • Basic Internet Architecture (next) nature of Internet – “Best Effort” service • Loss and Latency – Internet naming and addressing • Latency Compensation Techniques – Transport protocols (two choices: TCP or UDP) • Layered • Client-Server Synchronization Applications ( Half-Life, WoW, Mario …) Services ( DNS, HTTP, Overlay …) Transport ( TCP,UDP ) Network ( IP – Internet Protocol ) Slide 7 Slide 8 Endpoints and Addressing Internet Provides “Best Effort” Service • IPv4 numerical 32-bit (4 byte) values – Dotted quad form: 192.168.1.5 or 130.215.36.142 • Few guarantees on timeliness – In theory, 2 32 (about 4 billion) addresses, but practically fewer – Can take milliseconds, 100’s of milliseconds, or even seconds to since allocated in blocks • Each Internet host has IP address deliver packet IPv6 has 2 128 – Client running game client addresses (enough for 100 • Few guarantees on arrival certainty addresses for each atom on the – Server running game host earth surface) , but not – Sometimes packet doesn’t arrive (loss) widely deployed in • Some have 2 IP addresses U.S. – Or arrives out of order (e.g., packet #3 arrives before packet #2) – Client with wireless and wired network (multi-homed) – Or can arrive twice (duplicates, uncommon but possible) – Router with multiple connections • Packet has: source, destination • Time to reach destination called latency • Payload is upper layer – Lag typically latency + end-host (server and client) time (transport, application) • Network worries about arrival • Often, players have hard time distinguishing (More on loss and latency later) “Flow” determined by port , too • IP address related to,  Transport layer (next) but not same as domain name (later) Slide 9 Slide 10 User Datagram Protocol (UDP) Transmission Control Protocol (TCP) • Many applications sensitive to loss, not time – e.g., File transfer (.exe), email – Need reliable, ordered transfer of bytes UDP • Frames data  send as IP packets UDP • Provides connection • Uses window for outstanding packets – Provides flow control and congestion control • Some applications sensitive to time – Window grows with success, shrinks with loss – e.g., Voice over IP (VoIP) • – Lost packets retransmitted Unreliable, connectionless • No flow control (sender can go faster than receiver) • No congestion control (sender can go faster than network) TCP TCP – Note: IP does ensure there are no bit errors (via Cyclic Redundancy Check, CRC) • Lightweight , but a pplication must handle loss! Slide 11 Slide 12 2

  3. 4/10/2017 Transport Protocol Summary Transport Protocol Summary TCP UDP TCP UDP • Guaranteed arrival by • No arrival/order guarantees • Guaranteed arrival by • No arrival/order guarantees retransmissions retransmissions • No flow/congestion control • No flow/congestion control • In-order delivery • In-order delivery • Lightweight • Lightweight • Flow/congestion control • Flow/congestion control Which transport protocol to use for your game? Which transport protocol to use for your game? Only use UDP if you know game Not all games are sensitive to latency! sensitive to small amounts of latency  Use TCP  RTS, MMO How small? About 100 milliseconds Generally, easier to use TCP for games! Remember, your code must be robust to  Handles a lot of important bookwork loss! Slide 13 Unicast, Multicast, Broadcast Connectivity (prune) • Often edge most important – Game developer does not see internals • But some aspects important for understanding network performance – Hierarchy – Routing – Link-layer (a) Unicast, one send and one receive – Wastes capacity when path shared Independent choice for (c) Broadcast, one send and all receive Note, UE4 provides a packet route based solely multicast networking – Can work for LAN, but cannot do on Internet feature. However, on destination address this is not true IP – Can waste capacity when most don’t need - Not based on sender multicast, but rather - Not based on QoS (b) Multicast, one send and only subscribed receive replicated unicast to all clients. – Current Internet does not support – Multicast can work for overlay networks (separate topic) Slide 15 Slide 16 Connectivity – Routing (prune) Connectivity – Hierarchy (prune) • Routers use dynamic routing • Routers designed for speed – Discover topology – Get packet to outgoing link asap Note: Local (internal to – Pick “best” routes (want tree) ISP) routing protocol • Value + Prefix size different than among ISPs • Typically shortest path (# hops, (ASes). The “cost” – 128.80.0.0/16  all between ASes different latency…) w/ 128.80 go to R1 than simply distance. – R1 forwards more precisely to subnet – WPI has 130.215 with • 130.215.28 CS subnet • 130.215.36 CCC subnet (CCC1, …) • 130.215.16 ECE subnet… Slide 17 Slide 18 3

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend