Jump to content

Question about long-range pathfinder


Recommended Posts

After researched 0 A.D's source code (excellent work!),

I have some confusion about long-range pathfinder's current implementation.

In my understanding, each terrain tile should be split into 4x4 small cells for AStar. (This will make long path more accurately)

And when a unit start a longpath, all static obstruction's tiles (small cells) will be expanded by this unit's clearnce.

Has this feature be implemented now?

I cant find any code about "obstruction's tile expanded by unit's clearnce in long path".

I read the code:

CCmpPathfinder_Tile.cpp

void CCmpPathfinder::ComputePath(entity_pos_t x0, entity_pos_t z0, const Goal& goal, pass_class_t passClass, cost_class_t costClass, Path& path)

The params seem not to relate unit's raduis or clearnce.....and where to expand tiles?

Very thanks.

Edited by chansey
Link to comment
Share on other sites

The 4x4-navcell-per-terrain-tile thing and the clearance thing were part of the incomplete pathfinder redesign - #1756 has some versions of the original patch. None of it has been committed yet. (I think the redesigned long-range pathfinder mostly worked, but it needed integrating with the short-range pathfinder (which needed redesigning itself) and with various other systems, and that never got completed.)

  • Like 3
Link to comment
Share on other sites

but it needed integrating with the short-range pathfinder (which needed redesigning itself)

Thank Ykkrosh.

Following #1756, I found that the short path is also a new enhancement. (#1942)

It's a very great idea for short path performance improvement which make O(N^3) -> O(N^2) ! (http://www.wildfiregames.com/forum/index.php?showtopic=13042&&page=3#entry216735)

Has this feature been integrated into the current short-range pathfinder?

I am very sorry I have not deeply read current short path source code.

Edited by chansey
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...