You are previewing Fundamentals of Network Game Development.
O'Reilly logo
Fundamentals of Network Game Development

Book Description

Learn to create network games from start to finish with "Fundamentals of Network Game Development." Covering all the essential elements of network game development, this book provides the techniques and strategies necessary to create a quality game. Organized into three core sections-design, design and development, and development-the book explores all the unique, underlying aspects that game designers and developers need to consider when building a game that uses a network to connect players both with the game and with each other. You'll examine the characteristics that set a network game apart from one that is played offline, the different types of games and networks, how the design and development processes differ depending on the type of game, how design elements affect development implementation and vice versa, how to prevent cheating and hacking, and how to test the final product. Throughout each chapter, real games are used as case studies to help guide you through the challenges of creating your own games. "Fundamentals of Network Game Development" provides you with the foundation you need to create professional-caliber network games.

Table of Contents

  1. Copyright
    1. Dedication
  2. Preface
  3. Acknowledgments
  4. About the Author
  5. Introduction
    1. Design
      1. Chapter 1: The Challenge of Game Networking
      2. Chapter 2: Types of Network Games
      3. Chapter 3: Putting Game Networking Technology to Work
      4. Chapter 4: A Comparison of Network Game Types
    2. Design and Development
      1. Chapter 5: Creating Turn-by-Turn Network Games
      2. Chapter 6: Creating Arcade and Massively Multi-Player Online Games (Real-Time)
      3. Chapter 7: Improving Network Communications
      4. Chapter 8: Removing the Cheating Elements
    3. Development
      1. Chapter 9: Testing Network Games
      2. Chapter 10: Network Programming Primer
    4. On With the Show!
  6. 1. The Challenge of Game Networking
    1. Types of Networking
      1. Dial-Up and PPP Networking
      2. Local Area Networking
      3. The Internet and World Wide Web
      4. Wireless LAN
      5. Cellular Technology
    2. Network-Gaming Models
      1. The Client/Server Model
      2. Dynamic (Real-Time) Network Gaming
      3. Connectionless Network Gaming
    3. Data Exchange in Network Gaming
      1. Security
      2. Split-Information Model
      3. Balancing Data Exchange
    4. Key Decisions
  7. 2. Types of Network Games
    1. Multi-User Dungeon Games
      1. First Principles
        1. Genres
        2. Gaming Model
          1. Non-Interactive Environments
          2. Interactive Environments
        3. Security
        4. Social Gaming
      2. Text-Based MUDs
      3. Possibilities Beyond Text
        1. Graphics and Sound
        2. Security
        3. Virtual Worlds
    2. Arcade Games
      1. Gaming Model
      2. Security
      3. Data Exchange
    3. Massively Multi-Player Online Role-Playing Games (MMORPGs)
    4. Web and “Through the Browser” Games
      1. Text-Based Through-the-Browser Games
      2. Flash-Based Web Games
      3. Alternate-Reality Web Games
    5. From Theory to Development
    6. References
  8. 3. Putting Game Networking Technology to Work
    1. Components of Network Gaming
      1. Communication
        1. Communication in Multi-Player Network Games
        2. Communication in Single-Player Network Games
      2. Interaction
    2. The Platform
      1. Personal Computer
      2. Console
      3. Handheld Device
      4. Multi-Platform
    3. Complete System Architecture
      1. The Front-End Interface
        1. Plain Text
        2. Decorated Text
        3. Dynamic Decorated Text
        4. Applets
        5. Custom Game Interface
        6. Full Game
      2. The Middleware
        1. Web Server
        2. Custom Game Server
      3. The Back-End
        1. Files
        2. Databases
      4. The Network
        1. Networking Hardware
        2. Networking Protocols
        3. Networking Application Support
  9. 4. A Comparison of Network Game Types
    1. Categorizing Multi-Player Network Games
      1. Pseudo Single-Player Online Games
      2. One-on-One Games
      3. Team-Based Multi-Player Games
      4. Map-Based Multi-Player Games
      5. Real Time–Strategy Games
      6. Massively Multi-Player Online (MMO) Games
      7. Massively Multi-Player Online Role-Playing Games (MMORPGs)
    2. Comparing Network Game Types
      1. Turn-by-Turn Games Versus Real-Time Action Games
      2. Multi-User Dungeon (MUD) Games Versus Real-Time Action Games
      3. NPC Combat Games Versus Pure Multi-Player
      4. Player Combat Games Versus NPC Combat Games
      5. In-Browser Games Versus Standalone Client Games
    3. Design Principles
      1. From Single Player to Multi-Player
      2. Adding Network Support
        1. Centralized Architecture: Client/Server
        2. Distributed Architecture: Peer to Peer
        3. Mirrored Servers and Clustering
      3. Adding Multi-Player Support to the Design
        1. Location-Based Gaming
        2. Detecting Cheating and Hacking
      4. Testing Through Design
    4. Choosing the Technology for Your Game
    5. References
  10. 5. Creating Turn-By-Turn Network Games
    1. Turn by Turn Defined
      1. The Game System
        1. The Game-System Infrastructure
        2. The Playing Infrastructure
      2. Player Customization
        1. Avatar
        2. Community
        3. Competitions
        4. Stickiness
    2. Case Study: Project Rockstar
      1. The Premise
      2. Setup
        1. The Game Environment
      3. Playing the Game
        1. Money
        2. Allowing Interactivity
        3. The Update Cycle
        4. Balance
          1. Financial Balance
        5. Maintenance
      4. Solutions to Possible Problems
        1. Vacation Settings
        2. Pre-Programmed Behavior
      5. Alternative Approaches
    3. The Fictional PlanetStar RPG
      1. The Game Environment
      2. Profile, Ship Design, and Customization
      3. Update Cycles
      4. Pre-Programmed Combat
    4. Revenue Model
      1. In-Game Currency
        1. Upgrade Packs
        2. Time/Move Limitations
        3. Drawbacks
      2. Advertising Networks
        1. PPC Versus Display Advertising
        2. Where to Allow Advertising
        3. Terms and Conditions
      3. Direct Sponsorship
    5. Commercializing a Turn-By-Turn Game
    6. References
  11. 6. Creating Arcade and Massively Multi-Player Online Games (Real-Time)
    1. Game Models Revisited
      1. MMORPGs
        1. The Game System Infrastructure
        2. The Playing Infrastructure
        3. Player Customization
      2. Arcade Action Games
    2. Anatomy of a Game Model
      1. Client Software Structures
      2. Building Server Solutions
        1. Designing for Multiple Servers
        2. The Role of Databases
      3. End-to-End Networking Using IP
        1. Problem #1: Network Latency
        2. Problem #2: Network Jitter
        3. Problem #3: Network Loss
    3. Revenue Models
      1. The Direct Revenue Model
      2. The Indirect Revenue Model
    4. Merging Real-Time Gaming with the Internet
    5. References
  12. 7. Improving Network Communications
    1. Network Communication Issues
      1. Packet Loss
      2. Network Latency
        1. Jitter
        2. Lag
    2. Solutions to Network Latency Problems
      1. Networking Topography
      2. Design-Based Workarounds
        1. Networking Loops
        2. Bandwidth Reduction and Caching
        3. Sharing Responsibility
      3. Minimizing Exposure to Latency
        1. Latency, Buffers, and Packet Loss
        2. Rate-Adjustment Strategies
    3. The Principle of Minimum Data in Transit
      1. Basic Data Reduction
      2. Using Compression
      3. Using Game Environment Prediction
        1. Prediction Correction
        2. Synchronization
        3. Queuing Events
    4. Data Loss and Dropped Connections
      1. Combating Data Loss
        1. Detecting Data Loss
        2. Dealing with Data Loss
      2. Combating Dropped Connections
        1. Unintentional Dropped Connections
        2. Intentional Dropped Connections
    5. References
  13. 8. Removing the Cheating Elements
    1. What Is Cheating?
    2. What Are the Risks?
      1. Genre-Specific Risks
      2. Global Risks
    3. What Are the Solutions?
      1. Detection Approaches
        1. Human Detection Approaches
        2. Automated Detection Approaches
        3. Hybrid Approaches
        4. Categories of Detection Mechanics
      2. Prevention Versus Detection
      3. Action Versus Inaction
    4. Hacks, Cracks, and Cheat Codes
      1. How Hacks and Cracks Happen
        1. Reverse Engineering
        2. Physical Cheats
        3. Logical Cheats
        4. Spoofing and Spying
      2. Types of Cheats
        1. Exploits
        2. Augmentation
        3. Cracking
      3. Bots and Automated Playing
    5. Communication Layer Cheats
      1. Data-in-Transit Cheats
      2. Lookahead and Update Dropping
      3. Intentional Disconnections
      4. Solutions to Communication Layer Cheats
        1. Packet Serialization
        2. The Lockstep Protocol
        3. Data-Level Solutions
    6. Logic Layer Solutions
      1. Code Obfuscation in the Logic Layer
        1. Static Code Obfuscation
        2. Dynamic Code Obfuscation
        3. Possible Pitfalls
      2. Identifying Bots
    7. References
  14. 9. Testing Network Games
    1. Principles of Testing
      1. The Testing Process
      2. Components
        1. Network
        2. Interaction
        3. Middleware
        4. Database
        5. Testing Harness
      3. Types of Testing
      4. Strategy
        1. Development Testing
        2. Alpha Testing
        3. Beta Testing
        4. Public Beta Testing
    2. Testing the Network Layer
      1. Simulating Network Issues
        1. Latency Simulation
        2. Jitter Simulation
        3. Lag Simulation
        4. The Network Testing Process
      2. Load Testing
        1. One Way–Load Testing
        2. Duplex-Load Testing
      3. Sustained-Load Testing
      4. Peak-Traffic Testing
        1. Client-Side Considerations
    3. Testing the Logic Layer
      1. Simulating Player Interaction
      2. Stress-Testing the Middleware
      3. Stress-Testing the Database
        1. Database Test Automation
      4. Testing Non-Interactive Games
        1. Web Games
        2. E-mail (and Text Message) Games
        3. Online/Offline Games
      5. Testing the Client Software
        1. Proprietary–Client Software Testing
        2. Web-Usability Testing
    4. Re-Using Prediction Code in Testing
      1. Prediction Is AI in Practice
        1. Alpha Testing
        2. Beta Testing
    5. An Overview of Testing Options
  15. 10. Network Programming Primer
    1. An Introduction to Socket Programming
      1. Types of Sockets
      2. Protocol Layers
      3. Server-Side Sockets
      4. Client-Side Sockets
    2. Using Polling
      1. Server-Side Polling
      2. Client-Side Polling
    3. Sequential Processing Techniques
      1. Socket Polling Example
      2. Enhancements to Basic Round Robin
    4. Socket Programming
      1. Data Types
      2. Sockets and Ports
        1. Connecting to Remote Machines
          1. Server-Side Connections
      3. Sending and Receiving Data
        1. Datagram Socket Send/Receive
        2. Closing the Socket
      4. Client Example
      5. Server Example
        1. Selecting Sources
          1. Randomly Process Sockets
          2. Keep an Activity Log
          3. Sequentially Process Sockets
          4. Use Timeouts and Interrupts
        2. Buffers
        3. Sessions
    5. Open-Source Code Libraries
      1. MUD Libraries
        1. Messaging System
        2. User Management
        3. Persistent-Environment and Location-Driven Architecture
      2. Action Games
        1. Level/Map Management
        2. Attention-Based Updates
        3. Advanced Rendering
        4. Split Network Models
      3. Web Gaming
    6. Final Thoughts
    7. References