A question about A* path-finding
hi, my path finding is based on A*. Now I can find the correct path and go through the passable tiles. But if some units stand in my way when I am moving. How can I do to bypass them? Who can give me some advices or pseudos.
A way is to use steering behaviors to avoid dynamic objects
Check out Chris Reynolds' webpage for more informations
Hope this helps
Eric
Check out Chris Reynolds' webpage for more informations
Hope this helps
Eric
Assuming units fill tiles and make them inpassable, you can simply check the next 10 or so tiles in the path chain to see if they have become inpassable since path creation - then if they have you can simply repath. As long as this doesn't happen *too* often then you won't see too much of a performance penalty...
If it does become a problem, you could try computing a path to the path node a certain distance towards the goal. It means likely suboptimal paths and might not even work ( in which case you could easily fallback to the full pathing ), but it would likely speed things up.
I'd try for steering behaviours first though, definatly.
I'd try for steering behaviours first though, definatly.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement