Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Invader path finding idea:

This is just for when they decide to leave.  While they are invading, let them get lost.

Make a check at each step.  If the spot is in the list, do nothing.  If it is not record the location and the location they came from.

Character moves from x3 y3 to x2 y3.  It not being in the list it gets added.  Later on they move to x2 y3 from x1 y3.  x2 y3 already being in the list so, nothing added.  At this point they decide to leave.  Instead of returning to x1 y3, The list tells them to go to x3 y3.