Hello everyone!
I'm working on a tiled RPG game. You know, the type of game where you're in a world built out of tile images. Picture about any old GameBoy game. You can see the game board as a grid with tiles you can move on, and tiles you can't move on.
This is very simple to do when you only allow them to go up/down/bottom/top, one at a time. However, I want to make a system that lets them click any tile visible on the screen, and not only the adjacent ones. The problem here is that there are a lot of situations where you can't logically reach the tile that has been clicked, because it is surrounded by tiles that you can not walk on. (Eg: You are on one side of a fence, and the fence door is not on your screen)
Does anyone know of a clever and efficient way to find a possible path between the tile of the player and the destination tile?
Thank you in advance,
-Jorick