Pathfinding optimization.

Haha, glad I could help, Gudradain. :slight_smile: And yeah, Ah Maze is very slow, it is optimized in no way whatsoever and it slows itself down (even with 0) for demonstration purposes. I have many much faster algorithms hanging around but I don’t think I put them anywhere. But I wasn’t saying that you were doing anything “wrong,” your algorithm looks fine to me at a cursory glance. I was just saying that your time was too long, and seemed like it could be sped up. I will be one of many to say that premature optimization is pointless, and I definitely wasn’t judging in any way by you having a slower algorithm.

Are you doing some sort of RTS? (the lumberjack cutting tree thing). I figured that was the best approach for gatherer that always return the resource they collect to the same base (same destination = only 1 distance map).

No prob :). Just a question, you talked about mipmap. Was it just an idea out of the blue (something theoric) or you have actually seen it working with better performance than other form?

It’s an idea I’ve thought of trying a number of times but never have, and as far as I know there aren’t any games that have used it. In situations where there is a lot of open area (like Starcraft) I could see it making sense, but I’ve never made a game where it’s a good option.