September 11, 2012

Path Finding and Patch 0.1.1

Over the last few years I've had to write a number of implementations for path finding. Some of them were extremely robust and scaled into the tens of thousands of units! However, Combatics Evolution is significantly smaller when it comes to the number of units and size of playing area.

Currently, the map is a 12x12 grid, but I could easily set it to any size. I plan on supporting up to a 24x24 map with 7 units under the player control and a maximum of 11 enemy units. I have set the map to being completely flat right now with grass as the only terrain type. That will be something I'll focus on changing once I have finished adding a number of unit skills into the game.

I didn't like my original implementation for moving units around, it was a simple and got the job done but that is about it. Coming up in the next patch I have changed it so you can actually see the steps the unit takes (animations are still to come in the future). It also means movement isn't instant and I'll have to deal with collision and path finding. I think I have sorted it all out, and basically if a unit runs out of spaces to move before getting to the destination it simply stops moving as far as it can. When running a battle on a 24x24 map and only needing to run the pathing algorithm while a unit is moving, there was no effect performance. Which is great, because I want to target Android and efficiency means longer battery life for everyone!

Anyways, the scheduled release for 0.1.1 is September 15. There are a number of improvements already and I still have a few more days to sneak in a couple more changes!

No comments :

Post a Comment