Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualwodinoneeye

Posted 23 October 2012 - 12:28 AM

Much depends on what is dynamic (which effects continuing validity of a path that is found) .

If nothing impacts a path once it is built then the calculated paths dont need to be redone over and over

If the things that impact the path validity move less than once a second (or alot less), then re-calculating the paths much faster than that is a waste.
(You may even be able to detect IF something on the map changed each 'turn' and if it hasnt, then the previously calculated paths can be reused0

When the target is far away. you mau be able to continue to reuse the old calculated path (or only recaclulate it infrequently) until you get close enuf or get stuck on something dynamic. (You may have to find any factors/cases where it DOES matter to recalculate faster).


Usually when you are very close (terminal guidance) to the target is when you need to recalculate very frequently (which usually has to be handled specially anyway)

If you have alot of dynamic elements (things that block paths change alot) then there also can be processing variations that can reuse/patch a saved path data (so as to not require full recalculation).

----

Multi-threading can be useful when you have cores to spare- (and see Processor affinity to help that along) especially when you have many objects that need pathfinding done for them (but with the usual issues of handling any map dynamic changes ).

For huge maps (and long paths) - hierarchical pathfinding can be very important

#2wodinoneeye

Posted 23 October 2012 - 12:15 AM

Much depends on what is dynamic (which effects continuing validity of a path that is found) .

If nothing impacts a path once it is built then the calculated paths dont need to be redone over and over

If the things that impact the path validity move less than once a second (or alot less), then re-calculating the paths much faster than that is a waste.
(You may even be able to detect IF something on the map changed each 'turn' and if it hasnt, then the previously calculated paths can reused0

When the target is far away. you mau be able to continue to reuse the old calculated path (or only recaclulate it infrequently) until you get close enuf or get stuck on something dynamic. (You may have to find any factors/cases where it DOES matter to recalculate faster).


Usually when you are very close (terminal guidance) to the target is when you need to recalculate very frequently (which usually has to be handled specially anyway)

If you have alot of dynamic elements (things that block paths change alot) then there also can be processing variations that can reuse/patch a saved path data (so as to not require full recalculation).

----

Multi-threading can be useful when you have cores to spare- (and see Processor affinity to help that along) especially when you have many objects that need pathfinding done for them (but with the usual issues of handling any map dynamic changes ).

For huge maps (and long paths) - hierarchical pathfinding can be very important

#1wodinoneeye

Posted 23 October 2012 - 12:09 AM

Much depends on what is dynamic (which effects continuing validity of a path that is found) .

If nothing impacts a path once it is built then the calculated paths dont need to be redone over and over

If the things that impact the path validity move less than once a second (or alot less), then re-calculating the paths much faster than that is a waste.

When the target is far away. you mau be able to continue to reuse the old calculated path (or only recaclulate it infrequently) until you get close enuf or get stuck on something dynamic. (You may have to find any factors/cases where it DOES matter to recalculate faster).


Usually when you are very close (terminal guidance) to the target is when you need to recalculate very frequently (which usually has to be handled specially anyway)

If you have alot of dynamic elements (things that block paths change alot) then there also can be processing variations that can reuse/patch a saved path data (so as to not require full recalculation).

----

Multi-threading can be useful when you have cores to spare- (and see Processor affinity to help that along) especially when you have many objects that need pathfinding done for them (but with the usual issues of handling any map dynamic changes ).

For huge maps (and long paths) - hierarchical pathfinding can be very important

PARTNERS