Pixel Wars Part 5
Ugh, its been hard but I finally got A* pathfinding to work. It took a lot of work, but in the end it was worth it.
![]()
(The black line is just there to show the path of the worker, so it wont be there in the final game)Now you can tap on one of the floor pieces that are next to an open tile, or next to a marked tile, and mark it to be dug out. Once you tap on a tile to be dug out, one of the workers will go to it and use its laser to dig out the tile. As you dig around the map, gold might fall out of the tiles. These will just fall on the ground, waiting to be picked up by miners. I haven’t programmed miners yet, and the next thing I will try to program is the worker AI(Looking from marked tiles to dig out, then returning to base, ect).
