Building MMO (Massively Multiplayer Online) games is a challenging task. In addition to dealing with network loss, latency, synchronization etc, MMOs also require you to deal with a large amount of messages at a high frequency.
This is unique to MMOs because all the players that are concurrently connected (CCUs) to the game can potentially interact with each other. Henceforth, they all need to be aware of each other’s activities and movements. This is unlike room based games, where the messages to be exchanged are limited to players within the room only.
Lets say that you have 1000 CCUs in a room-based game (eg: poker) with about 5 players in one room. Each player (client application) receives the messages from only 4 other players at a time. On the other hand, if the game is a world-based MMO, then each player can receive messages from 999 other players. This leads to exponential message processing across the game and has severe implications on its performance as well as the network bandwidth.
A common solution to this problem is to divide the world into regions and define ‘Interest’ areas for each player. The interest area is a continuous set of regions around the player’s current position from which the player will receive updates. As the players move in the world, their Interest area is constantly updated. This means each player only receives messages from relevant players that are ‘close’ to it and can potentially effect its game play. The below diagram illustrates the interest areas of two players. A player will receive updates only from players that lie in its interest area.
The following video from our sample illustrates the concept. Observe how the players only see each other when they are in the other’s interest area and disappear when they move too far from one another.
A detailed guide on implementing interest management using AppWarp S2 is available on our site. It also contains source code (server side and the AS3 flash client) of a complete working sample.
We would love to hear your feedback on our forum.
Leave A Reply