Advertisement

Pathfinding is expensive, so...

Started by December 11, 2004 03:54 PM
27 comments, last by Timkin 20 years ago
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!"
Hehe...

It's not 'my' Distance Transform algorithm. In the thread referenced I do explain and provide an algorithm for the DTA, however I certainly didn't invent this algorithm.

Cheers,

Timkin

This topic is closed to new replies.

Advertisement