Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

Pathfinding definitely has some issues when using click/tap to move. It always tries to go as far as it can on one cardinal direction before going in another, and it can only backtrack by a maximum of one square in a direction away from progress before it fails to find a path. To illustrate, where _ is open squares, X is inaccessible squares, S is the starting location, T is the targeted location, and O is the player's final position after pathfinding fails:

XXXXXXXXXX
_____OXX___T_
__XXXXX______
S_______________

The pathfinding will send you up before it sends you left, and then it will fail to find a path and not move you after sticking you in the dead end, even though there is a very clear path between the starting location and the target location.

(+2)

Right, I'll see if I can figure out something for it.