Ghostees: Load Testing The Server

Ghostees: Load Testing The Server

The server culls down how many entities the game client will see so not to overload it. On the server I have masks that are used to categorize and prioritize what needs to be seen on any client. Click the video to head on over to youtube.com and watch it in HD.

As of this writing, I’ve had the server up to 400 concurrent connections @ 50% cpu but in the next build I think I can double that performance. There are many optimizations I know I can do at this point. Load has a lot to do with the number of entities that can see each other at any one time which corresponds to the number of messages I need to generate.

The chart below is with 95 connected entities that can all literally see each other.

As it is in that video, every entity can see every other entity within a vision radius. To achieve the 400 connections, I reduced the vision radius of NPCs and left the larger radius for actual players. This is where the masking comes in. NPCs don’t really care about a lot of entities. They may not care about any entities of their same race for instance. They may only care about players or perhaps even entities of a race they are at war with. The mask is simply a set of flags that determine who they care about seeing. Combine this with an appropriate vision radius. For instance, NPC’s don’t have to see as far as players. They only need to see as far as their maximum aggro radius. On the other hand, players need to see further so that characters don’t magically warp in.

World design also plays a part in controlling this. If you can see a great distance in front of you at any one time, you could potentially see a lot of entities. Have a look carefully at the design of Orgimmar or Iron Forge in World of Warcraft. Also think about how dungeon instances are designed. These areas are designed either to manage a high density of players or to keep game latency down to a minimum by carefully managing your visual distance. This will keep both the client and server snappy.

If you have other ideas for managing this, I’d love to hear them. Please post a comment!

Tags: , ,

Leave a Reply