Pathfinding feature request

It would be awesome if the pathfinding could exploit subterranean gates, and monoliths such.

As long as the player has discovered where they lead to (and possibly even if he hasn’t), it would be nice to click on somewhere far on the map, and see the quickest way to get there so that the player doesn’t have to memorize such things, and basically do far pathfinding himself.

It would make it much easier for the AI to exploit such objects as well.

We consider adding such feature to the pathfinder. If it’s reasonably simple to implement I can do this soon (maybe even in this month). I’ll discuss this issue with Tow.

It’s in my plans for pathfinder. However, such paths won’t be always save. Player cannot decide to which teleporter it will be moved (can only try until success). If one of not discovered monoliths is occupied by enemy, we can get caught in such trap.

Several other improvements are planned, such as calculating path map when selecting hero (then we run pathfinding only when changing selected hero and we can read paths to any tile very fast). However I can’t say when it will be done.
(now my priority is GUI and pregame, there is also a plenty of awaiting bugs)

At the moment, the biggest slowdown for the AI is pathfinding. The AI checks to see if there is a path to every visible object about twice. Caching would help a lot because in debug mode, the enemy AI turn tends to take forever, and it is not doing any heavy computation other than pathfinding.

One other thought, the AI also sometimes checks paths from hypothetical hero positions. For example, if the hero wants to get back to town, how far out of the way would it be to first visit a pile of ore (requires dist from ore to town). In the future, many paths from the hypothetical position will often be required, so caching would help even for starting positions that are not the heroes “current” position.