Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Database/World Building

Development::Database/World Building World Building forum, dedicated to the EQEmu MySQL Database. Post partial/complete databases for spawns, items, etc.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 09-07-2010, 02:12 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

The pathfinding algorithm works like this, from initial aggro:
Code:
If the mob has Line-Of-Sight to the player, and there are no large vertical drops in between them, the mob runs directly toward
the player.

If there is no LoS, or there are large vertical drops, then:

   A list of nearby path nodes to the mob is determined and from these candidates, the node that is nearest to the player is
   selected.

   A list of nearby path nodes to the player is determined and from these candidates, the node that is nearest to the mob is
   selected.

   The shortest route between the start and end nodes (via other path nodes) is calculated.

   The mob paths to the start node, follows the nodes to the end node, then runs directly to the player.
Things are actually slightly more complicated than that. As the mob is pathing, it will periodically check if the player has moved, and recalculate it's route
if the player moves by a certain amount.

Also, as it's following it's route, the mob will periodically check if it now has LoS to the player, in which case it will discard it's route and just make a bee-line toward the player.

In the event that there is no route between the mob and the player that can be determined as I have described above, then the mob will just run directly toward the player, regardless of whether there are walls or other obstacles in the way.

As long as any place on the Hate plane wall has LoS to a path node on the ground, then you shouldn't need to put any nodes on the wall itself.

The key thing in placing path nodes is to ensure that everywhere in the zone has LoS to a node, but not to put too many redundant nodes.

e.g.

if you have a long straight corridor with no alcoves or rooms branching of it, you only need one node at each end.

If you have a square room, you really only need one node outside the door to the room and one just inside, that will have LoS to any location inside the room.

Last edited by Derision; 09-07-2010 at 05:02 PM..
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 05:33 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3