Hi folks,
I've been working on a simple path find function and thought I would share it with anyone that needs it.
The algorithm itself is based in the article of Patrick Lester that you can find here :
http://www.policyalmanac.org/games/aStarTutorial.htm
You can use the buttons below the grid for pretty much everything.
The first three buttons will let you choose what will be placed on the grid if you click it (Wall, Start point, End point)
As you press each one of these buttons the sprite on its left will highlight to let you know it's chosen.
The toggle diagonals button will do exactly that, toggling between "no diagonals", "diagonals without cutting corners" and "diagonals allowing to cut corners", you can see which one is active by the green text on the top right of the screen.
The Find Path button will do just that and the Clear Path will clear the path markings if there is any on the grid. Each time you press Find Path it will automatically clear the existing one if any.
Hope someone will find this useful and if you have comments or suggestions please post them
Cheers.
Edit : Just thought I would add a screenshot as well.