My first pathfinding algorithm
I managed to write a pathfinding system without watching any direct coding tutorials on how to do it. All I've really done before coding this, is watch a video on how pathfinding algorithms generally work and figured out the rest. It wasn't easy though, this is probably the most lines of code I've written into a project so far.
I've also went about doing a different script structure than normal. Personally I think it looks better.
CONTROLS:
- Click a tile to add/remove a wall.
- Right click to place/move the target tile
- Press the Space key and watch the magic happen!
The reason I went ahead to do this is because I figured that knowing how to do pathfinding is one of those things that are necessary to making most games. Along with animations, spritesheets, serialization, and the works. Hopefully I can write a more efficient system in the future, so what do you think?
Thanks for checking this out!