From what I've seen in places like west commons, there are no area spawn points (maybe you are seeing it in another zone?), but rather spawn points that can spawn multiple mobs at a time (ie: where you would see 3 spiderlings floating in mid-air together). I'm sure they use wander grids though.
The emu currently implements wander grids, doesn't it? I haven't really looked at it too much. I don't see why a wander grid would need to be confined to the shape of a rectangle, though. Any convex shape shouldn't be too terrible to make work, I think.
Anyway, even if you did want to create a spawn grid, it doesn't sound too bad. Off the top of my head it seems as though you could do the following.
Create an ordered set of points (x,y,z), used as vertices for the resulting spawn grid. From these points, the server might form triangles (ie: four verticies creates two triangles, six vertices creates four triangles, etc). Store these triangles off somewhere. When it comes time to spawn a mob, pick a triangle at random, and spawn it somewhere between the three vertices of the chosen triangle.
This could be turned into a function to generate a point within a grid, and then applied to wander grids, graveyards, etc.
|