0

In my RTS game I used BFS, it is very slow.

So i am using A* now, it is very fast to find a path, but if there is no possible path it makes everything about to be hanged.

To solve this i tried to get out of the loop if it takes much considering to the linear distance between src & dst. But in some cases where the linear distance is very short but path is long it fails.

Rakesh Malik
  • 607
  • 1
  • 6
  • 27
  • How about distributing the calculation over multiple frames, and perhaps using the most promising direction before full answer is available, if waiting for it is unacceptable? – Marcin Łoś Sep 10 '13 at 12:44
  • OK I am checking how it results – Rakesh Malik Sep 10 '13 at 12:51
  • See http://gamedev.stackexchange.com/questions/32813/32831#32831 – BlueRaja - Danny Pflughoeft Sep 10 '13 at 14:58
  • i tried distributing the pathfinding by threading, but the problem still remains, that particular unit stands for long time....the unit stops only when destination is blocked.....so i think HPA* would also have the same problem...... cant it be somehow calculated if there is a path or not easily – Rakesh Malik Sep 10 '13 at 17:03

0 Answers0