Leader

Wednesday, April 2, 2008

Dynamic Spawn System (DSS)

Using a dynamic spawn system seems like a difficult task that would take up countless server resources, but in reality it’s simple if you keep things limited and reduce the dynamic spawn under certain circumstances. It’s more complicated than I can explain in one post, but here are the basics.

Each player will have a number of spawn slots attached to them, for our example we will say 10. So wherever the player goes he can expect no more than 10 mobs to spawn in his immediate area if he is the only one there. The mobs that spawn in these slots will be within 3 levels of the character (so a lvl 30 character would find lvl 27-33 mobs). The level of these mobs is also affected by the zone level they are in, and mobs will only spawn in if they are appropriately leveled for that zone. For instance, a lvl 32 player going into a lvl 20-29 zone will only find lvl 29 mobs spawning around him, but a lvl 34 player will find no mobs spawning (because there are no mobs that can spawn). This is largely to prevent high level characters from spawning high level mobs in low level zones to grief newer players. Also, in cities and areas where only regular friendly NPCs would spawn, no mobs spawn. Although, special battleground or defense sites could be fun as the number of players would determine the strength of enemy attacks. Another point is that if you are a low level character going into a higher level areas, your full spawn compliment will spawn, and they will all be the minimum level for the area. A lvl 10 going into a 20-29 area will find a lot of lvl 20s around him.

When a player is mounted or traveling fast, the number of dynamic spawns is reduced by half or one quarter. That way the world still seems populated, but the server load is greatly reduced as is the likelihood mobs will knock you off your mount (which is annoying). After a mob is out of your site range (and a little additional distance) it is despawned unless it is within sight range of someone else, in which case it is assigned to them as a spawn. When you dismount the remaining mobs will spawn in slowly over the next few minutes. When spawning in, if you are standing still no mobs will spawn within normal agro range. They may still walk within agro range, but they will not spawn on top of you. Now if you are a lower level character going into a higher level area (like our lvl 10 going into the 20-29 area) mobs will spawn within your agro range, because it is much larger than if you were a level 20.

Also, each zone should have a limited number of total spawns that is independent of number of players in the area, but it should be virtually impossible for players not to spawn mobs around themselves. This is to reduce server lag. It is very likely that many characters will be in certain areas during events and the first few weeks of the server (and in the high-level areas) so these areas should have a high total spawn cap.

I’ll go in depth into individual parts and effects of this system in further posts and as I figure things out.

No comments:

Post a Comment