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.

Reply
 
Thread Tools Display Modes
  #1  
Old 09-07-2010, 11:35 AM
Brewhaus
Sarnak
 
Join Date: Aug 2010
Posts: 38
Default

Ok, will do. Ya, I am comfortable with SVN as I code for a living.


Follow-up question about pathing... Do you know how pathing works if a mob can't find a path to the character they aggro on? Do they path to the nearest node to the character and then take a direct path from that node or do they not use any pathing and just b-line to the character? The reason I ask is that I wasn't planning on putting pathing on the outer wall in hate. I was hoping the mobs would path to the nearest node at the base of the wall and then take a direct line to you but I haven't tested it yet. If I have to place nodes on the wall the mobs are either going to path weird on the wall or there will have to be hundreds of nodes on the wall.
Reply With Quote
  #2  
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
Reply

Thread Tools
Display Modes

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 09:36 PM.


 

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