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.

PixelWars4

(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).

Advertisement

~ by admin on September 2, 2009.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.