I want to make an A* pathfinding algorithm.
I have an idea how to find a good path while maintainjng some amount of performance, but once I reach the target I don't know how I'm going to trace back the best route. I was thinking of giving each marker 3 scores which contain the coordinates of the previous block it was on, so it can trace back easily. The problem is it will require macros, which will crush the performance. Another problem is if there isn't any path that will lead to the target, how do I prevent it from going on forever