Jump to content

  • Log In with Google      Sign In   
  • Create Account

Clearance-based pathfinding with dynamic obstacles


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 pandaa   Members   -  Reputation: 178

Like
0Likes
Like

Posted 03 February 2013 - 08:52 AM

http://aigamedev.com/open/article/clearance-based-pathfinding/

Is it possible to handle dynamic obstacle in clearance-based pathfinding? how about the performance?



Sponsor:

#2 Dan Violet Sagmiller   Members   -  Reputation: 897

Like
0Likes
Like

Posted 12 February 2013 - 02:49 PM

Yes.  

 

As an example, the obstacle would need to alter the map tiles when being set or released.  Typically, I would recommend generating an function that processes all the blocks in a given region.  Vector A to Vector B.  When the map loads, that gets processed as the entire map.  Vector(0,0) to Vector(?100,?100).

 

Next, when an obstacle is placed, wreckage, downed bridge, whatever, it marks the tiles it needs to as Blocked.  Then calls the function to recheck the tiles allowable unit size for all the tiles surrounding the ones that were changed.  I.e.  I put an obstacle at (5,5) and (5,6)  I would then run the sizing function for all the tiles from (3,3) to (7, 8)

 

This presumes that each tile holds an integer for unit size allowed.  One that is editable.

 

Maps can be saved with this information already stored, to reduce processing on load time.  And otherwise the performance will be minimally affected by short range size updates.  A* is going to be a huge hog compared with this.


Moltar - "Do you even know how to use that?"

Space Ghost - “Moltar, I have a giant brain that is able to reduce any complex machine into a simple yes or no answer."

Dan - "Best Description of AI ever."

My Game(s), Warp Wars is in early development and can be found here: http://blog.WarpWars.Net.


#3 Dan Violet Sagmiller   Members   -  Reputation: 897

Like
0Likes
Like

Posted 12 February 2013 - 03:02 PM

Additional Note, I hadn't seen or considered, Clearance Based Path Finding before.  I like it, and will definitely use it.  I do apply similar tactics though, for instance AI for Non-Military units takes into account enemy positions and reduces the value of tile positions the closer to enemies the path is, making it far less likely to use an enemy riddled path.  It is somewhat similar, but this is most useful.  


Moltar - "Do you even know how to use that?"

Space Ghost - “Moltar, I have a giant brain that is able to reduce any complex machine into a simple yes or no answer."

Dan - "Best Description of AI ever."

My Game(s), Warp Wars is in early development and can be found here: http://blog.WarpWars.Net.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS