Hey all,
I regularly stream the development of a Corona SDK game I’m making. In the last four episodes, I implemented A* pathing, and I thought that might be useful to some of you.
If you’re unfamiliar with A* (a star), it’s an algorithm for figuring out the shortest path between two points in a grid. It’s one of the most commonly used algorithms for having a character navigate a 2D grid level in games.
You can watch me implement it here:
https://youtu.be/S3Q-twbUdJM?list=PLiojEujE0RPMWQxPfJ9LRSif_drhnG12G
You can get the code here:
https://github.com/tylermakes/bulbasaur (bulb_astar.lua)
And if you’re having trouble understanding it, I recommend this tutorial which I based my streams on:
http://www.redblobgames.com/pathfinding/a-star/introduction.html
Happy Holidays!