Hasty Briefsbeta

1500 Archers on a 28.8: Network Programming in Age of Empires and Beyond

13 days ago
  • #Multiplayer Networking
  • #Game Development
  • #Real-Time Strategy
  • PAX East highlighted the 'deprofessionalization of video games', with successful games by solo devs and small teams potentially leading to a lack of specialists.
  • Age of Empires faced challenges with simulation step times varying greatly due to rendering, AI pathing, and other factors, limiting the number of units that could interact in real-time.
  • The multiplayer code for Age of Empires aimed to support 8 players, smooth simulation over various connections, and a target platform of a 16MB Pentium 90 with a 28.8 modem.
  • A synchronous simulation approach was adopted, where each machine runs the same simulation with identical commands, ensuring all games remain identical despite network conditions.
  • Speed control mechanisms were implemented to adjust turn lengths dynamically, ensuring smooth gameplay even with varying internet latency and processing speeds.
  • UDP was used for networking, with systems in place for command ordering, drop detection, and resending to handle unreliable connections.
  • Security was a significant benefit of the synchronous model, as any deviation in simulation would be detected and the game stopped, making cheating difficult.
  • User behavior studies revealed that consistent latency was preferable to variable latency, with 250-500 milliseconds being playable for RTS games.
  • Metering and early prototyping were crucial for understanding and optimizing multiplayer performance, with tools developed to monitor and adjust network demands.
  • The transition to RTS3 involved a fully 3D engine, support for more players, and improved networking with a focus on TCP/IP and home network configurations.
  • An object-oriented approach was taken for RTS3's network architecture, abstracting protocol specifics to simplify implementation and maintenance.
  • Peer-to-peer topology was retained for RTS3, offering reduced latency and no central point of failure, though it posed challenges with NAT configurations.
  • The net.lib library was developed to provide a layered architecture for networking, from low-level socket operations to high-level game communications.
  • Improved synchronization tools and multiplayer-enabled console commands were introduced in RTS3 to streamline debugging and enhance the multiplayer experience.