Pathfinding is expensive, so...
Wouldn't it work best for pathfinding to divide your map into smaller and smaller tiles? First you would pathfind on the largest level, and save that path. Then you would pathfind the next largest tile level, and save that path, etc. So if you had a map divided into 10x10 large tiles, it would first find the path to the goal large tile. Then you would find a path to the first tile to move to in a smaller grid inside the start tile, and unwind like that. It would also allow the whatever to end up in a dead end, so if you detected that, it would be faster and more realistic.
"Whatever I feel like, Gosh!"
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement