Oct 31, Fall 2005Game Design1 Networks Network Protocols Peer-to-peer Client-Server Configurations Trust.

Slides:



Advertisements
Similar presentations
Introduction 1 Lecture 13 Transport Layer (Transmission Control Protocol) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer.
Advertisements

Network and Application Attacks Contributed by- Chandra Prakash Suryawanshi CISSP, CEH, SANS-GSEC, CISA, ISO 27001LI, BS 25999LA, ERM (ISB) June 2006.
Umut Girit  One of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer.
Dead Reckoning Objectives – –Understand what is meant by the term dead reckoning. –Realize the two major components of a dead reckoning protocol. –Be capable.
Intermediate TCP/IP TCP Operation.
CISCO NETWORKING ACADEMY PROGRAM (CNAP)
IS333, Ch. 26: TCP Victor Norman Calvin College 1.
UDP & TCP Where would we be without them!. UDP User Datagram Protocol.
Transport Layer – TCP (Part1) Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
Network synchronization of Online Games Li, Zetan.
Nov 27, Fall 2006IAT 4101 Networks Network Protocols Peer-to-peer Client-Server Configurations Trust.
UDP - User Datagram Protocol UDP – User Datagram Protocol Author : Nir Shafrir Reference The TCP/IP Guide - ( Version Version.
Transport Layer 3-1 Transport Layer r To learn about transport layer protocols in the Internet: m TCP: connection-oriented protocol m Reliability protocol.
Long distance communication Multiplexing  Allow multiple signals to travel through one medium  Types Frequency division multiplexing Synchronous time.
TCP connection my Computertelnet client web server remote computer 1 character per transmission * Telnet uses TCP connection * but Nagle's algorithm modifies.
Introduction to Multiplayer Network Technology Thomas Lidy.
2: Application Layer 1 1DT066 Distributed Information System Chapter 3 Transport Layer.
WXES2106 Network Technology Semester /2005 Chapter 8 Intermediate TCP CCNA2: Module 10.
TCP: Software for Reliable Communication. Spring 2002Computer Networks Applications Internet: a Collection of Disparate Networks Different goals: Speed,
3-1 Transport services and protocols r provide logical communication between app processes running on different hosts r transport protocols run in end.
FIREWALL TECHNOLOGIES Tahani al jehani. Firewall benefits  A firewall functions as a choke point – all traffic in and out must pass through this single.
Process-to-Process Delivery:
1 CMSCD1011 Introduction to Computer Audio Lecture 10: Streaming audio for Internet transmission Dr David England School of Computing and Mathematical.
TRANSPORT LAYER T.Najah Al-Subaie Kingdom of Saudi Arabia Prince Norah bint Abdul Rahman University College of Computer Since and Information System NET331.
Game Networking CS381 Sushil J. Louis Dept. of Computer Science and Engineering University of Nevada, Reno From and much thanks to
Presentation on Osi & TCP/IP MODEL
1 Semester 2 Module 10 Intermediate TCP/IP Yuda college of business James Chen
Network Physics Created by Ruslan Yavdoshak for Nikitova Games, 2008.
IP and Errors IP Best Effort Datagrams can be: –Lost –Delayed –Duplicated –Delivered out of order –Corrupted.
Introduction to Networked Graphics Part 3 of 5: Latency.
Data Link Layer We have now discussed the prevalent shared channel technologies  Ethernet/IEEE  Wireless LANs (802.11) We have now covered chapters.
Introduction to Networks CS587x Lecture 1 Department of Computer Science Iowa State University.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 OSI Transport Layer Network Fundamentals – Chapter 4.
1 LAN Protocols (Week 3, Wednesday 9/10/2003) © Abdou Illia, Fall 2003.
TCP : Transmission Control Protocol Computer Network System Sirak Kaewjamnong.
CS332, Ch. 26: TCP Victor Norman Calvin College 1.
University of the Western Cape Chapter 12: The Transport Layer.
1 The Internet and Networked Multimedia. 2 Layering  Internet protocols are designed to work in layers, with each layer building on the facilities provided.
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
Transport Layer Moving Segments. Transport Layer Protocols Provide a logical communication link between processes running on different hosts as if directly.
Review:. Chapter 3: The Data Link Layer –achieve reliable, efficient communication between two physically connected machines. –Example problems to be.
Client-Server Model of Interaction Chapter 20. We have looked at the details of TCP/IP Protocols Protocols Router architecture Router architecture Now.
Networking Basics CCNA 1 Chapter 11.
Lecture 4 Overview. Ethernet Data Link Layer protocol Ethernet (IEEE 802.3) is widely used Supported by a variety of physical layer implementations Multi-access.
S305 – Network Infrastructure Chapter 5 Network and Transport Layers.
Computer Networks23-1 PART 5 Transport Layer. Computer Networks23-2 Position of Transport Layer Responsible for the delivery of a message from one process.
UDP & TCP Where would we be without them!. UDP User Datagram Protocol.
Networks, Part 2 March 7, Networks End to End Layer  Build upon unreliable Network Layer  As needed, compensate for latency, ordering, data.
4343 X2 – The Transport Layer Tanenbaum Ch.6.
UDP : User Datagram Protocol 백 일 우
1 Kyung Hee University Chapter 11 User Datagram Protocol.
Building A Network: Cost Effective Resource Sharing
1 Computer Communication & Networks Lecture 23 & 24 Transport Layer: UDP and TCP Waleed Ejaz
Data Communications and Networks Chapter 6 – IP, UDP and TCP ICT-BVF8.1- Data Communications and Network Trainer: Dr. Abbes Sebihi.
McGraw-Hill Chapter 23 Process-to-Process Delivery: UDP, TCP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
Computer Networks 1000-Transport layer, TCP Gergely Windisch v spring.
Chapter 9 The Transport Layer The Internet Protocol has three main protocols that run on top of IP: two are for data, one for control.
Network Models. 2.1 what is the Protocol? A protocol defines the rules that both the sender and receiver and all intermediate devices need to follow,
Chapter 11 User Datagram Protocol
The Transport Layer Implementation Services Functions Protocols
Process-to-Process Delivery, TCP and UDP protocols
Virtual World Architecture II
PART 5 Transport Layer Computer Networks.
Transport Layer Unit 5.
Process-to-Process Delivery:
CPEG514 Advanced Computer Networkst
Building A Network: Cost Effective Resource Sharing
Process-to-Process Delivery: UDP, TCP
Transport Layer 9/22/2019.
Presentation transcript:

Oct 31, Fall 2005Game Design1 Networks Network Protocols Peer-to-peer Client-Server Configurations Trust

Oct 31, Fall 2005Game Design2 Topics  AI –Flocking & coordinated movement –Planning –Pathfinding and search  Networking –Multiplayer/things not covered today  Audio

Oct 31, Fall 2005Game Design3 Other topics  Advanced graphics –Animation –Deformation, inverse kinematics –Motion capture –Particle effects –Special lighting  Ethics –Cheating, justice

Oct 31, Fall 2005Game Design4 Other topics  Fake terrain  Industry  Playtesting  AIwisdom.com

Oct 31, Fall 2005Game Design5 Networks  Required for multiplayer games  3 Standard technologies –Modems –Ethernet –Internet

Oct 31, Fall 2005Game Design6 Internet  The greatest thing since sliced bread  The savior of humanity  Will increase freedom and democracy –Around the world –In your neighborhood

Oct 31, Fall 2005Game Design7 Internet User Protocols  TCP –Connection –Reliable –Bytes arrive in order they were sent –Collects small packets and transmits them together –Stream of bytes  UDP –Connectionless –Unreliable –Arbitrary arrival order

Oct 31, Fall 2005Game Design8 TCP  Reliable stream of bytes –Implies the need for a “connection”  Connection sets up data structures –Hold incoming packets –Hold outgoing packets –Handle retransmits

Oct 31, Fall 2005Game Design9 TCP Reliability  Each packet does Send-Receive- Acknowledge  Sender holds sent packet until ACK is received  Sender retransmits if ACK takes too long Sender Receive Receiver Send Acknowledge

Oct 31, Fall 2005Game Design10 TCP  One Send-Receive-Ack takes time  Overlay Sends and Acks  Maintain a queue in sender and receiver Ack Send Sender Receiver

Oct 31, Fall 2005Game Design11 TCP Circular Queue -- Sender  Sends data and Puts it in send queue  Sets timer on this queue item  If timer expires, and no ACK, re-send data –Set another, longer timer –Exponentially increasing time  When ACK received –If this queue slot is the oldest, Free the slot for new data  If no queue space avail, sender app waits!

Oct 31, Fall 2005Game Design12 TCP Receive Queue  Receiver maintains a queue the same size as the sender’s  When a packet arrives, send ACK  If the packet is next in sequence –Give it to application  Else Keep it in queue –Another, earlier packet is on its way

Oct 31, Fall 2005Game Design13 TCP  If no ACKS arrive for a long enough time –Temporarily gives up –Sends test packets  When test packets get through –Starts slow, builds up

Oct 31, Fall 2005Game Design14 TCP Wrap-up  Connection sets up sequencing and queues –Reliable arrival: Retransmit –Reliable order:Sequence numbers  TCP bunches up data on 200ms intervals –Minimizes overhead for small chunks of data –This option can be turned off  TCP Has an “emergency” channel –OOB Out Of Band

Oct 31, Fall 2005Game Design15 UDP  Connectionless! –No underlying data to maintain  Unreliable transmission –If you lose a packet, it’s gone –Network software must handle this  Out-of-order arrival –Network software must handle that, too!  Fast –When the port gets the data, the app gets it

Oct 31, Fall 2005Game Design16 UDP  Packets will drop! –1 in 5 over non-local connection  Have to do your own re-send  Some packets are time sensitive –Care little about the past ship location  No header compression –May end up with greater overhead than TCP with PPP

Oct 31, Fall 2005Game Design17 Game Architectures  Peer-to-peer  Client/Server –One server per game  Floating server –One client is also a server  Distributed server –Multiple servers for large world

Oct 31, Fall 2005Game Design18 Peer-to-Peer  Simple version: Lockstep –eg. Doom –Each client transmits to other –Wait for everyone to get data –Proceed to next step

Oct 31, Fall 2005Game Design19 Peer-to-Peer  Advantages –Simple –Nobody has to provide a server Including the Game’s authors! –Good for turn-based games with low bandwidth –TCP  Disadvantages –Frame rate is that of Slowest machine Worst connection –Hackable –Not good for real-time games

Oct 31, Fall 2005Game Design20 Client/Server  Server per game –MUDs, Fireteam, NetTrek –Someone must provide server ($$$) Possibly the game’s authors –Less hackable –Single point of failure –Server must be big & well-connected

Oct 31, Fall 2005Game Design21 Floating Server  Peer-to-peer  Server resolves the action  One peer is the server –Unreal One player elects to be the server –X-Wing vs Tie-Fighter: First player to enter session –Starcraft Player with the CD

Oct 31, Fall 2005Game Design22 Multiple Server  Many machines coordinate service –Ultima Online, Everquest, AOL  Used for large virtual worlds  Everquest –One server per game-geographic region –Freeze on handoff affects game play

Oct 31, Fall 2005Game Design23 What Data to Send?  Sending entire world state is usually too much  Can send just user actions –Simulation engine does the same thing at each client –Pseudo-random numbers from same seed

Oct 31, Fall 2005Game Design24 Sending User Actions-- Problems  Any error in engine –Divergence in worlds –Small error can lead to big divergence  X-Wing vs Tie Fighter –Created a resynchronize protocol –Causes jumps Wrote smoothing algorithm for resynchs  Sim City 2000 Network Edition –Send checksums for world state each turn

Oct 31, Fall 2005Game Design25 Prediction  Eg. Unreal  Waiting for user inputs is too slow  Client does prediction –Motion prediction  Server corrects things if client is wrong

Oct 31, Fall 2005Game Design26 Prediction: Dead Reckoning  Eg. SIMNET (US Army Tank Simulator)  Each vehicle simulates own tank  Sends data every 5 seconds, updating –Position, Speed, Acceleration –Expected path –Prediction violation criteria  Receiver simulates own tank –AND simulates local copy of other tanks

Oct 31, Fall 2005Game Design27 Dead Recokoning  Receiver gets latest 5-second update  Updates own copy of other tanks  Predicts other tanks –Using prediction data –Until new data arrives  Each simulator also sends update –When own prediction violates own criteria  Assumes latencies < 500ms

Oct 31, Fall 2005Game Design28 Dead Reckoning Sim A A’s Predicted Path B’s Predicted Path Sim B Sim A A’s Predicted Path B’s Predicted Path Sim B B Exceeds prediction: predict again and transmit Transmit new prediction every 5 seconds Predict B Predict A

Oct 31, Fall 2005Game Design29 Dead Reckoning: Requirements  Data structures for other entities  Model of entity behavior –Vehicle speed, acceleration range, turn radius –Responsiveness to commands  Situation parameters –Following a road –Precomputed path (NPCs)

Oct 31, Fall 2005Game Design30 Multiple Copies  Maintain 2 Data sets  Now –Accurate self –Predicted others –“Zero” latency for self  Ground Truth –Accurate everybody –Large latency for almost everybody – ms ago

Oct 31, Fall 2005Game Design31 Latency Issues  When latencies get high –Prediction gets worse and worse  Correcting prediction errors may cause visual jumps –Easy to notice!  If jumps are large enough –Temporarily interpolate between wrong prediction and the new correction

Oct 31, Fall 2005Game Design32 Prediction Interpolation Real Interpolated Response Predicted

Oct 31, Fall 2005Game Design33  Some games may allow distributed ownership –Ballistic simulation –Shooter fires bullet –Intended target receives the simulation  Sports - eg. Tennis –Player A hits ball –Player B gets simulation token –B simulates ball path from A’s racket Token Ownership

Oct 31, Fall 2005Game Design34 Trust  “Never trust the client”  Data on the user’s hard drive is insecure –Diablo utility to modify character data –Wrote patch to prevent hacking Throws out your stuff if there’s a time inconsistency –Daylight savings nuked my stuff!

Oct 31, Fall 2005Game Design35 Trust  Network communications are insecure  NetTrek communications are encrypted  NetTrek also requires “blessed” client –Servers have different policies on requiring a blessed client –Prevents robot players or assistants

Oct 31, Fall 2005Game Design36 Trust -- Checksums  First line of defense: –Checksum of all packets –Include header in checksum! –Stops casual tampering  Hash function –Hard to compute source value from result –MD5

Oct 31, Fall 2005Game Design37 Checksums  Not immune to: –Code disassembly –Packet replay  Packet replay attack: –Capture a legal packet, and re-send it more frequently than allowed –Client can restrict send frequency –Server cannot reject high-frequency packets Internet bunch-ups are source of OK bunch-ups

Oct 31, Fall 2005Game Design38 Combating Replay  Each new packet client sends is different –Add a pseudo-random number to each packet –Not just sequence number! –Client & Server match pseudo-random numbers  Random numbers –Seeds must match! –Dropped packets: include sequence number!

Oct 31, Fall 2005Game Design39 Combating Replay  XOR each packet with a pseudo-random bit pattern –Make sure the bit patterns are in sync! –Based on previous synchronized pseudo- random numbers  Add junk – Confuse length analysis

Oct 31, Fall 2005Game Design40 Reverse Engineering  Remove symbols  Put encryption code in with rest of network stuff  Compute magic numbers: –At runtime –In server  Encrypt from the start!

Oct 31, Fall 2005Game Design41 Lists Of Servers  Denial of service: –Send a packet to server-server saying “I’m a server” –Fake the IP return address with a random IP# –Server-server adds “new server” to list –Server may run out of memory storing hundreds of thousands of fake servers

Oct 31, Fall 2005Game Design42 List of Servers  Require a dialog –Server-list server responds with Password Keepalive interval –Password must be given by attacker at the correct time –Works OK if client is not better connected!

Oct 31, Fall 2005Game Design43 References  CS4455 course at GA Tech by Chris Shaw  /cs4455_fall/