Tuesday, December 26, 2006

Reinforcements

I have just finished implementing Kingdom Specific reinforcements for Kingdoms of Arcania. Fall of Rome has a set reinforcement schedule for all kingdoms. This new feature will enable The Tyrant, a kingdom of Goblins, Orcs and other fell creatures to receive reinforcements more often than the Elves, who do not reproduce so quickly. Keep the reinforcement schedule in mind when you choose the kingdom you want to play!

Tuesday, December 12, 2006

Campaigns Mod Points

I took a break from integrating the new Kingdoms of Arcania map, and made a quick change to Campaigns of Centurion. The mod point awards are now substantially higher. The algorithm is simple - the first place winner receives a number of mod points equal to the number of human players * 2. Subtract 2 points for the second place winner, another two points for the third place winner, and so on. This should make it easier for players to accumulate points, and we will start to see some interesting changes to starting kingdoms.

Saturday, December 09, 2006

Why Test Suites Are Mandatory

I am not the original developer on Fall of Rome. From my perspective, much of the application is Legacy Code (Affiliate). During the Team Game Launch, I fell fell victim to the lack of unit tests around many parts of the game.

There is a method in the game that returns all orders for any Actor - emissaries, agents, and pop centers are included. This method had a bug. Instead of using the equals() method to determine if the actor executing the order was the same, it used the == operator, which requires the actor to be the exact same instance. This doesn't work if the actor has been recreated, and you are now trying to find out what orders it issued.

After fixing this bug, I ran all the tests I have written, and everything worked well. Unfortunately, several of the game orders did not. There was validation code in place that checked to see if the actor issuing the order had done anything else that turn (train military leaders, build a temple, etc). Once I fixed the getMyOrders() method, it started failing all the validations (the vallidations were written to work with the broken code). This caused no end of difficulties for players who discovered these bugs.

Two lessons learned here:
1) Programmer tests are mandatory - with a test suite in place this bug would not have occured.
2) Be very careful when "fixing" legacy code.

I've learned both of these lessons before - it's a shame to have to relearn them like this.

Sunday, December 03, 2006

Team Game Launched

The Fall of Rome team game enhancements have just been released. New Regular and Veterans games will allow players to delcare allies and enemies, trade resources and intelligence. Thanks to everyone who has helped in the testing.

Team Game Launched

The Fall of Rome team game enhancements have just been released. New Regular and Veterans games will allow players to delcare allies and enemies, trade resources and intelligence. Thanks to everyone who has helped in the testing.