Friday, July 25, 2008

This week I worked on getting the combat turn system implemented. I planned to have a fully playable version of the game done today, but unfortunately I wasn't able to meet that goal. I ran into several bugs as I worked on the combat turn which slowed my work. A couple of these bugs were in previously written code but just didn't surface until I had written the combat code. The other thing that slowed down my progress was the time it took to setup each combat test case. I had to go through a couple turns of the game just to get to the point where I could test out each new feature. This caused significant slowdowns when hunting down a segfault.

I started this week by finishing work on the fleet object so that it holds a set of normal orders and combat orders. I added a toggle which sets whether the fleet is a combatant in the combat turn (and should have combat orders enabled). I then added the reinforce order which is the only order used in combat.

Then I began work on implementing the combat turn into taeturn. It first determines which fleets should have their combat orders enabled. Then it determines the initial strength of each side. Then processes all of the orders. Then determines the winner of the combat and awards points to the winner.

What I have left to do is award points for the winner of external combat. Remove the losing side of external combat. Rebuild the region after removing the losing fleets, and then doing one final check to see if there needs to be another turn of combat to resolve all the conflicts. I'm going to try to get some work done on this during the weekend, and I should have it done early next week. After that I will do a writeup with screenshots to show how the combat works, and then start cleaning up and testing everything in the game.

0 comments:

Post a Comment