8.2.2.1
Priority between players
On Nostalrius, all of the players and all of the maps were not updated with the same priority. The battleground and then raid maps were on the top priority causing players to not experience any significant delay there. Inside a single map, actions of fighting players were handled on a priority over actions from non-fighting players, or even idle players.
8.2.2.2
Priority between actions
A priority has also been established between player actions, in the following order:
- Top priority: Movements and spells.
- Map related actions (pet command, loot, etc.).
- Mail, auction house, etc.
This was achieved by handling packets a different number of times depending on their category.
8.2.2.3
Visibility distance reduction
The last option to increase performance was ultimately to reduce the visibility distance. This is something that has a really high impact on the gameplay, and should be avoided if possible.
The visibility distance reduction for NPCs, game objects and players was reduced on Nostalrius when a single map update would take more than 400ms (meaning more than 200 ms of delay for spells, as they are updated twice per map update).
In practice, this would only happen on continents with a really high number of online players. With the continent instantiation system, only specific overcrowded continent areas would be affected by this reduction.
However, Nostalrius limited the visibility distance reduction to 60 yards, as the game would no longer be playable at all below this limit.
8.2.3
Players in the same area
In some very special situations, the previous optimizations are no longer sufficient to reduce the delay. For example, when thousands of players meet in the same area.
“It might not have been the right idea to have everyone on our realms at the exact same place at the same time.” - Rob Pardo on Blizzcon 2013.
In these situations, every single player’s public action (movement, mana / health modification, spell casted, etc.) has to be broadcasted to every other player in the area. For 100 players in the same area, it means 10,000 packets per second if every player is doing one action per second in average.
As this situation was anticipated for either capital raids, or special world events (world bosses release), a benchmark was created to figure out how our emulator could handle these situations.
When we saw the results, we decided to work to allow these very special Vanilla events to happen on our realm without crashing the server. We identified the main bottlenecks in these situations:
- SMSG_(COMPRESSED_)OBJECT_UPDATE: This packet is prepared and sent (com-pressed) for every player in the area individually, whenever one value of a player changes (health/mana regeneration for example).
- When a player moves, the server has to send them all of the objects now visible from his new position.
The map update workflow was also changed to parallelize these computations when-ever a specific area is overloaded, using a “Map-Reduce” paradigm. With this novel algorithm, Nostalrius is able to use all of the computational power available to deal with insanely populated areas.
TL;DR:
Private servers were not server/client secure and compromised on many things in order to deliver a playable experience.
Name another 3D MMO that is secure and similar to WoW that can have hundreds of player characters in the same vicinity without lagging.
Name one.