The Dark Unknown: New Monster Wandering System
On The Dark Unknown’s Facebook page, Goldenflame Dragon has posted a lengthy explanation of the new — and innovative! — monster wandering system he has implemented in his Ultima-inspired, tiled, browser-based RPG:
As I sat down to start some coding, I realized that I’m not really happy with that simplistic idea. Creatures will basically never make it through bottlenecks (mountain passes, bridges, etc) unless they are specifically chasing the player. If I want to restrain a monster from wandering out of a specific area, that’s a flag on the spawner (leash distance), so I don’t need to use bottlenecks for that. Also, if my monsters wander randomly I may have a bunch of them notice the PC at about the same time and suddenly converge from several directions, which seems a bit silly.
So now I’ve created a network of 40 “points of interest” on the main map. If a monster can’t find the player (conceptually, anything it wants to fight, but in practice, that’s just the player here), it grabs a path towards a nearby PoI- by getting paths, it’ll use bottlenecks. Periodically it will pick another PoI that is attached to the last one it was heading towards and start pathing towards that instead. Thus it’ll sometimes double back, and sometimes head off into areas that aren’t on direct lines between two PoIs because it was halfway between two when it picked a third to head towards. I’ll add a little random wander to it as well. Additionally, some PoIs are along roads- monsters will not have them as part of their network, while bandit types will only have them in their network.
He is in the process of making a map showing all of the points of interest that monsters will wander between, and will show it off once it is complete (although he does offer a mild spoiler warning in advance).