I'm currently making a game in Unity that's a 2D sidescroller (so all sprites are viewed from the side).
I have procedurally generated terrain (so think Terraria-esque), and I want to be able to click on one of my tiles and have a sprite path to it.
However, the sprite needs to know the following things:
- Whether or not the tile is accessible (aka it's not completely underground or way up randomly in the sky)
- What the shortest path is to get there.
I'm currently storing my tiles as a short array.
Knowing this, is A* the best algorithm for me to pursue? Does anyone have any other good info/tips of where to begin looking into this sort of thing?
My main conceptual difficulty is making it so the AI knows whether or not a tile is accessible.
Any help/pointers is appreciated!