Search code examples
architecturegame-enginedistributed-system

How multiplayer games like MMO's handle massive requests


I asked myself how mmo's like ragnarok, WoW, handle the actions("requests i guess") they send to the servers? Like one player use some item or kill a monster, or activate a skill, how the game handle this in time fashion, to show this in others players game instantly, I saw one time that seems to be some event driven architecture, the player change the state of the game, and send the event to the server, but how? in massive multiple game clients open.


Solution

  • This is a very large question. But I will give you the shortest answer. If you want to know more, you can read Multiplayer Game Programming book to get more details.

    Most of MMO games are server-client games (Some games are peer-to-peer, but they are too minor percent). There are 3 types of server-client games:

    • Authoritative server: The game server’s simulation of the game is considered to be correct. If the client ever finds itself in different state with the server, it should update its game state based on what the server says is the game state.
    • Dedicated server: They only run the game state and communicate with all of the clients. The dedicated server process is completely separate from any client processes running the game. This means that the dedicated server typically is headless and does not actually display any graphics. Most of games is run on dedicated server, this type also is sub-classification of Authoritative server.
    • Listen server: One of the players can use their machine as both a server and a client. Game publisher doesn't need to rent servers in a cloud provider. One require is that a user's machine running as a listen server must be powerful enough and have a fast enough connection to handle this increased load.

    If you want explore more about some famous or AAA game server, checkout some open-source server like:

    • RakNet is a part of Oculus then Facebook now, but they stop development from 2015. One of famous game use RakNet is Minecraft, the server is forked then written Java (instead of C++ as original).
    • Agones is a collaboration project of Google and Ubisoft for Google Cloud Computing and Assassin's Creed Odyssey game. Their demo of server and client is here.