Download presentation
Presentation is loading. Please wait.
Published byRosalyn Hunt Modified over 9 years ago
1
1 Network Gaming
2
History of Network Gaming MUD MUD –Multi-user Dungeons Modem Games Modem Games Match Makings Match Makings –Real-time strategy –FPS MMORPG MMORPG –MMOG –Massive Multiplayer Online Role-playing Games 2
3
MUD A large scale game with fantasy-type A large scale game with fantasy-type Create your own character Create your own character –Strength/Intelligence/Endurance/Wisdom Most of the MUDs are text-based Most of the MUDs are text-based –MUD commands Players play them simultaneously Players play them simultaneously Persistent worlds Persistent worlds –The amount of time invested –Never ending Competition Competition –Skill & Attributes –Experience points Ownership Ownership –Acquire better items Society Society 3
4
Modem Games BBS Games BBS Games –Turn based –Strategy Modem-to-modem Games Modem-to-modem Games 4 Player 1Player 2 Modem Phone
5
Match Makings Puzzle/Table Games on the Net Puzzle/Table Games on the Net – 休閒遊戲 RTS RTS –Real-time strategy games –IPX –TCP/IP FPS FPS –First-personal-view shooting games AI AI Game Lobby Game Lobby –Match making –Ranking –Chatting –A special case »Xbox Live 5
6
MMORPGs Graphical MUD Graphical MUD –With much more functionality Persistent Persistent Real-time Online ( 即時在線 ) Real-time Online ( 即時在線 ) Pay-for-play Pay-for-play New Game Style New Game Style –RPG –Adventure –Action –Society –Messaging –Avatar 6
7
Network Gaming Architecture Peer-to-peer Peer-to-peer Client server Client server 7
8
Peer-to-peer Client Broadcasts Messages to Each Other Client Broadcasts Messages to Each Other Simple Pattern Simple Pattern Easy to Code Easy to Code But Need More Bandwidth for Each Client But Need More Bandwidth for Each Client Limited Players Limited Players Fault Tolerance Fault Tolerance High Security Risk High Security Risk 8 Client 1 Client 2 Client 3 Client 4 Host
9
Client Server One Server Serves Every Clients One Server Serves Every Clients More Complex in Coding More Complex in Coding Many Players Many Players The Server Needs More Bandwidth The Server Needs More Bandwidth –This means “Expensive” Improved security Improved security No fault tolerance No fault tolerance Dedicated Server Dedicated Server 9 Server Client 2 Client 3 Client 1
10
Internet Consideration Limit Network Bandwidth Limit Network Bandwidth Unstable Network Environment Unstable Network Environment Update Frame Rate Update Frame Rate –For match making : 5-8 fps »Position updates »Inventory updates »Kill or killed »…»…»…»… –For MMOG : 1-2 fps »Position updates »Inventory updates »Kill or killed »Friend list updates »Chatting »Messaging »…»…»…»… 10
11
Poor Networking Problems Limited bandwidth Limited bandwidth –Data packet size is important –Solutions »Data compression »Lower update frame rate Low update frame rate Low update frame rate –Synchronization is the key –Solutions »Extrapolation »Prediction »Chasing Network LOD Network LOD Network Visibility Network Visibility 11
12
Data Packet Data Compression Data Compression Encode / Decode Encode / Decode CPU time vs data size CPU time vs data size Socket Socket TCP/IP & UDP TCP/IP & UDP 12
13
Network Data Compression Must be Lossless Compression ? Must be Lossless Compression ? Zip ? Zip ? Bit, Byte, Short or Long ? Bit, Byte, Short or Long ? Fixed-point or Floating-point Fixed-point or Floating-point Run-length Compression Run-length Compression Use Index/ID Instead of Data Use Index/ID Instead of Data 1 Boolean = 4 bytes 1 Boolean = 4 bytes 13
14
Position Extrapolation Use Position(i-1) & Position(i) to Get the Next Possible Position (i+1) Use Position(i-1) & Position(i) to Get the Next Possible Position (i+1) No Velocity Data is Needed No Velocity Data is Needed 14 i-1 i+1 i real path i+1 i+2
15
Position Prediction Use Current Facing Direction to Predict Next Position Use Current Facing Direction to Predict Next Position Update : (position, facing direction) Update : (position, facing direction) 15 i-1 i+1 i real path i+1 i+2
16
Position Chasing Always being Late One Step to the Master Always being Late One Step to the Master Not Good for Moving Fast Objects Not Good for Moving Fast Objects 16 i-1 i real path i+1
17
Network Visibility Server Will Not Update the Position of the Clients that are Out of a Specific Range of One Client Server Will Not Update the Position of the Clients that are Out of a Specific Range of One Client Only When the Outside Clients Move into the Range of the Client Only When the Outside Clients Move into the Range of the Client That Means the Client Can Not “See” the Clients Outside its Range on the Net That Means the Client Can Not “See” the Clients Outside its Range on the Net 17
18
Network Level-of-details Besides the Network Visibility, Apply the Network LOD to the Client Between Clients Besides the Network Visibility, Apply the Network LOD to the Client Between Clients For Each Client, the Server Should Adaptively Adjust the Update Frame Rate for the Other Clients to the Target Client According to Their Physical Distance For Each Client, the Server Should Adaptively Adjust the Update Frame Rate for the Other Clients to the Target Client According to Their Physical Distance 18 5fps 3fps 1fps invisible Me
19
TCP/IP or UDP Some Game Data Can Be Lost Some Game Data Can Be Lost –Position for the object in each frame –UDP is fast but not reliable Some must be Not Some must be Not –Kill or not kill, killed or nor killed –TCP/IP Hybrid Data Transmission Ways Hybrid Data Transmission Ways –Data-can-not-lost going through TCP –Data-can-lost going through UDP –Or implement your reliable UDP solution 19
20
Network Security Anti-hacking Anti-hacking –System administration issues –Very important in MMORPG Cheat prevention Cheat prevention –Technical example: »A “fake” client instead of the game client to send cheating data packets. –Game-playing example: »Using the game bugs to get the improper fortune Be-killed -> Dead -> Get free money -> Be-killed ->… Be-killed -> Dead -> Get free money -> Be-killed ->… 20
21
Develop Tools & Solutions Match-makings Match-makings –DirectPlay in DirectX SDK –Socket programming –Middleware »ie., Quazal NetZ Internet Causal Games Internet Causal Games –Web programming –SQL programming MMORPG MMORPG –Socket programming –Middleware »Terezona from Zona »Eterna from Quazal »Butterfly.net 21
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.