View Single Post
  #5  
Old 12-31-2007, 03:48 AM
fathernitwit
Developer
 
Join Date: Jul 2004
Posts: 773
Default

Quote:
Originally Posted by eq4me View Post
Suppose we have some sort of fear path that must be visible from every part of the map. For every mob in the zone we can now calculate an straight path to the nearest visible point of this fear path. From there the mob will stay on the fear 'path' and moves further away from his original spawn point.
This is exactly how fear pathing is implemented already. It is taken one step further in that once you get on the pre-calculated grid, you need to know where to go next. I organized everything into a giant tree with no loops (minimal spanning tree of all path edges), theoretically with the trunk of the tree being somewhere in the center of the map (but it could be anywhere). When a mob first hits the fear path, they will path up to the root of the tree, and then they will path down the longest path from there. back and forth. We may need to adjust this algorithm once its actually in use.

Quote:
Originally Posted by eq4me View Post
Of course you can't just use a path but more of an area or you would end up with huge amounts of waypoints for wide open zones, but this method would be rather light on CPU cycles and you can even use this pathing to let an Mob find back to his original path or spawnpoint.
Generating such an fear path/area might not be trivial. Maybe it would be better to have a simple tool that gives an rough template which can be refined by human intervention.
We will end up with huge amounts of waypoints, and its not a big deal since it is one instance per zone. But you hit on the real challenge, building the grids in the first place is the hard part.
Reply With Quote