Download presentation
Presentation is loading. Please wait.
Published byAlaina Walker Modified over 8 years ago
1
CSE 5912 Networking Tech Talk Mike Alquist.2 Glen Gainer.25 Austin Neidert.13
2
Before Internet □ Time-Sharing □ Host-based □ LAN / Ethernet □ Peer-to-peer
3
Time-Sharing □PLATO □ Empire ■ Wargame similar to Risk ■ Text based
4
Host-Based □ MUD ■ Roy Trubshaw ■ Text-based RPG Adventure ■ Multiple users on one network
5
Peer-to-Peer Networks □ Maze War □ https://youtu.be /7chDIySXK2Q?t =2m20s https://youtu.be /7chDIySXK2Q?t =2m20s □ 2:20
6
LAN / Ethernet □ SGI Dogfight ■ Developed 1983 ■ 1984 - Local Network capabilities ■ 1986 - UDP broadcast capability added ■ 1989 - IP Multicast capability (224.0.1.2)
7
Eventually, Internet □ College → Industry □ Burst of Multiplayer Games □ Disks → Online Software □ Facebook Games
8
Notable Games □ Neverwinter Nights □ Doom □ Quake □ Command & Conquer □ Diablo □ Counter Strike
9
Use Case: Counter Strike Updates □ Problem: Updates, version mismatches, cheating, licensing □ Solution: Steam ■ Buy games online ■ Scheduled updates ■ VAC □ Downloads immediate data ■ Ability to rollback □ Requires broadband connection
10
With the Internet Came Risks □ Piracy □ Network Security Issues ■ Technological Risks (Malware) ■ Social Risks (Social Engineering) □ Data Breaches ■ PlayStation Network (2011) ■ Steam (2015)
11
Data Breach Use Case: PlayStation Network □ External Intrusion (Anonymous?) □ 77 Million Users Affected □ Network down for 23 days □ Sony releases patch 3.61 to fix security issues ■ Still didn’t go online □ May 14th - Service restoration
12
Internet Layers Application Transport Network Link Physical 5 Layer Model
13
Physical Layer How to send bits out over a cable Twisted Pair CableFiber Optic Cable
14
Link Layer How to make sure bits get across safely between two machines Ethernet frame Preamble for Synchronization & Flow control CRC for Error checking Data defined in higher network layer
15
Network Layer How to make sure bits get to the right machine in whole network
16
Transportation Layer TCP – Transmission Control Protocol UDP – User Datagram Protocol
17
UDP - User Datagram Protocol a.k.a Unreliable Datagram Protocol Connectionless / Datagram Based
18
TCP - Transmission Control Protocol Reliable Connection Oriented / Stream Based
19
TCP Details (3 Way Handshake)
20
TCP Details (Sending Data) Alternating BitSliding Window Request / Data ACK
21
TCP Details (Closing Connection)
22
Which protocol UDP/TCP to use?
23
Application Layer How to interpret the bits
24
Questions so far? Send us an ACKnowledgement of understanding before we present the next packet of information to you. Or help us stall for time, your choice.
25
Implementation in Games □ Basic communication □ Basic game models □ Problems that arise as a result of networking □ Socket Libraries
26
Basic Communication □Players send messages □Players receive messages ■ need to be handled □Command Pattern used often
27
Basic Game Models □ MMO ■ Server/Client □ Matchmade Game/First Person Shooter ■ Server/Client ■ Some clients act as a server for their game
28
Problems □ Socket Exceptions □ Threading Problems □ Point Interpolation □ Back to Back Messages □ Port Forwarding □ Cheating
29
Socket Exceptions □ socket.accept() ■ server initialization ■ incorrect protocol ■ socket already bound
30
Socket Exceptions □ socket.connect() ■ server can’t be reached ■ incorrect IP address ■ incorrect port ■ not port forwarded ■ server never started
31
Socket Exceptions □ socket.send() ■ unexpected disconnection
32
Socket Exceptions □ socket.receive() ■ unexpected disconnection ■ end of stream □ null message □ empty message □ -1 returned
33
Threading Problems □Blocking I/O □Accessing resources with separate threads ■ message buffer ■ semaphores ■ check for null □Game logic in Unity needs to be handled in the main thread
34
Point Interpolation □Smooth look and feel □Continuous variables ■ location □State related problems ■ animation
35
Back to Back Messages □socket.send() gets called faster than socket.receive() can be called and handled
36
Port Forwarding □ When hosting a server □ Static internal IP address □ Static external IP address □ No-IP
37
Cheating □ Let server handle important game play □ Server verifies clients’ actions are valid before telling other clients □ Client uses necessary information for display
38
Socket Libraries -.Net Sockets □ Lower level □ Sends and receives byte arrays □ All message handling is left to the programmer □ All serialization is left to the programmer
39
Socket Libraries - UNet □Higher level □Done for you ■ some sending ■ some receiving ■ some handling ■ some serialization □Also has classes that allow the programmer to do manual sending and handling
40
Socket Libraries - UNet
41
□ Important classes ■ NetworkBehaviour □ [Server] □ [Client] □ [SyncVar] ■ NetworkTransform ■ NetworkProximityChecker □ Authority properties
42
Socket Libraries - UNet □ Attribute Examples
43
Final Questions?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.