Prev NEXT

How MMORPGs Work

Client-server Interaction

Here's a basic look at what happens when a group of characters attacks a monster in a typical MMORPG:

Click to advance.

  1. The group approaches the mob. The groups' clients inform the server of where they are, and the server tells the clients which monster is nearby. The client accesses files relating to the monster's appearance and movement, which are stored on the computer's hard drive.
  2. A tank, or a character designed to be able to absorb a lot of damage, attacks the mob. The tank's client sends a message to the server, informing it of the attack. The server relays that information to the rest of the group's clients.
  3. The party's damage dealers, known as damage per second (DPS) or nukes, attack the mob. Their clients inform the server of what actions they take. The server calculates damage dealt and received and informs each client.
  4. The party's healer casts healing spells on the members of the party. The healer's client informs the server of what spells are being cast and on whom. The server calculates how much healing is done and relays the information to the rest of the party.
  5. The mob's artificial intelligence (AI) protocols determine how the mob behaves during the fight, and the server relays that information to the clients. If the party successfully kills the monster, the server informs each client to display the monster's death animation, which is stored on the computer's hard drive.
  6. A member of the party loots the monster to see what treasure it carried. The server selects items from a loot table at random and tells the clients which items dropped. If some of the players in the group have a quest that requires a certain item from the mob, the server instructs the client to display the icon for that item.
  7. The players, using text or voice chat, decide who will get an item according to the rules of their group or guild. They may use a built-in random number generator to determine who gets what item. If so, the server which distributes the results to all the other clients.
  8. The player who wins the loot clicks on it to pick it up. The client informs the server that the player has done so. The server informs the client to add the item to the player's visible inventory. It also stores the change in the player's inventory in that player's database entry.

These same steps can apply to just about any encounter in the world, whether it's with a player and an NPC, or a player and another player in a player-versus-player (PVP) environment. All of the information travels back and forth between the client and the server as packets of data. While many players rely on broadband Internet connections to handle the data, the transactions don't necessarily require a lot of bandwidth. Usually, the packets are small, but they come in bursts.

Advertisement

­More important than the speed of the player's Internet connection is how long it takes for information from your computer to travel all the way to the game server, and vice versa. If there are bottlenecks along the way, the player might experience latency. Latency is another name for a traffic delay. Sometimes, it's noticeable -- a player might attack a monster and have to wait a few seconds before the monster responds. In some cases, latency can significantly disrupt game play.

Developing an MMORPG requires more than just figuring out how to send these packets of data from one place to another. Next, we'll look at what it takes to create an MMORPG.­­