Update: the end follows the mouse and the pathfinding is now instant. (sometimes it takes a second because it's re-generating the level) Also, I have fixed some glitches. Space still works if you want to change the start. Ai pathfinder Space to change the Start and End positions Blue tiles = Path Red tiles = Tiles that have been used Green tiles = Tiles that can be used Filled black tiles = Walls Black tiles = Nothing Filled green tile = Start Filled red tile = End
Based off of A* pathfinder All codes by me I think If the end is at the bottom sometimes the pathfinder thinks it's at the top. Also, don't put the start directly next to the end... I'll fix that later. (I half fixed this, I might just make a version 2 and fix more things) Sometimes things go really weirdly. Just try hitting start again, it might fix it for whatever reason.