Although most of my time is tied up learning ASP.Net MVC in preparation for my next job, I have found a little time to tweak some of the existing subsystems in Ancient Armies.

First to come under the spotlight was the orders symbology subsystem.

There was a lot about it that really grated against my engineering perfectionism….

Firstly, there’s the ghastly oscillation of the symbols when the units are moving. If you watch any of the previous Ancient Armies videos you will see the movement arrows bouncing up and down as the units moved!

Not on my watch! This kind of amateurish behaviour has to go!

Secondly, and perhaps much more importantly, was the issue of how the units interpreted the orders:

Having the units move until their centre points rested on the end of the movement arrows makes for a system that it is very difficult for a player to accurately order a unit to a specific location.

As a result I felt this behaviour had to go too!

Under the new system, units move up to their leading edges. This makes it much easier for a player to align a unit with other units and any linear terrain features that are on the map – something that would have been quite difficult to pull off in the old system.

Sorting out the rather dodgy animations and the way the orders were interpreted sounds rather noddy and trivial, but alas it was not. Consider the following screenshot:

In reality everything in the game is composed of triangles – regardless of what their outward appearances might otherwise suggest. This is because video game cards are optimised to only work well with triangles.

The upshot of this is that I have to write code that calculates every triangle in a scene in realtime! If that wasn’t enough of a challenge, the system also demands that all triangles are to be drawn clockwise, further adding to calculation complexity.

So despite being a small subsystem, it certainly gave my brain a good work out! 😀

The video below compares the old system against the new system, so that you can judge for yourself whether the improvements are worthwhile. In addition, as an added bonus, I include some footage of Ancient Armies operating in raw triangle mode so that you can see the calculations happening before your eyes! <Cue Circus drum roll!>

Best viewed in HD!

That’s it for this week. Time to play with ASP.Net MVC, Razor and IOC containers!

Laters

RobP