Column orders symbology – Done!

Column orders symbology - Done!

Column orders symbology – the finished article!

This week I have been working on adding the orders symbology for column movement and completing further work for its integration into the orders subsystem.

The symbology shown last week was an embryonic unit graphic rather than the orders symbology graphic. I had hacked it into the orders system so that I could easily review and test its graphics without having to fully implement them.

All of that had to be pulled out and replaced with a new set of graphics that represent the actual orders symbology itself. Don’t worry, the previous work hasn’t been thrown away, it’s still there lurking, ready for the next development phase.

My biggest concern with designing the orders symbology is that it had to fit in seamlessly with the other existing orders symbols.

My first attempt wasn’t entirely successful:

The first iteration looked pretty cool until....

The first iteration looked pretty cool until….

... it was viewed alongside other orders symbology...

… it was viewed alongside other orders symbology.

I found that the first iteration’s attempt looked fine on its own, but looked very jarring and out of place when combined with other orders. This resulted in a further iteration to refine the symbology so that it fitted in perfectly – the results of which can be seen in this post’s first image (all images can be clicked on to view close ups).

Another feature of the orders symbology is its ability to display its waypoints whilst in edit mode:

In edit mode the column's waypoints are visible as small circular waypoints.

In edit mode the column’s waypoints are visible as small circular waypoints.

A small touch, but one that helps everything feel like a coherent whole. Once the order has been issued the waypoint markers disappear.

Getting the Bezier based arrows to look like the other arrows was a tricky job as the arrow thins down along its length like the other arrows. Calculating the many triangles for this proved to be entertaining, especially as Direct-X insists on all triangles being wound in a clockwise direction (they won’t show if wound the other way!).

Below is a short video showing off the new symbology in action. Best viewed in HD:

So what’s next on the agenda?

That will be the ability for our units to actually move down those designated column orders! It’s going to be a big task, but I will be breaking it down by only concentrating on the basic integration first.

Advanced integration with Atlas will happen in the sprint after the next one.

That’s it for this week!




Telematics – Courtesy of Hermes!

Telematics Baby! (Click for full size)

Telematics Baby! (Click for full size)

Last week I alluded to having to write a new telematics system for Ancient Armies.

Well, it’s now here, mostly….

The screenshot above was taken from the new telematics application. It can connect to any game running on any networked machine and provide real-time graphical detail with regards to the multitude of hidden variables within the game.

Below is a screenshot of the game that was sending its data:

The scenario that's sending its data.

The scenario that’s sending its data. (Click for full-sized image)

You will need the eyes of an eagle-hawk, but the only noticeable difference between this game window and the older ones is the new telematics button on the far right of the main toolbar.

This button is normally hidden by default. To show it and gain the use of telematics one must first go to the options screen and pop across to the new Telematics tab:

The new telematics tab!

The new telematics tab!

This tab allows one to enable telematics and to pick the machine that the telematics application resides on. I have greyed out my machine names as I don’t want the internet to know the names of my local computers.

Once enabled, the telematics button becomes available on the main menu. Simply click this to allow the automatic sending of data.

If the telematics application is not running whilst the game is sending data, this is not an issue. The system will simply wait for the telematics application to start then automatically send the backlog of telematics data. In the meantime, one can carry on playing!

This new feature brings a lot to the table. Firstly, I can now see what’s happing in every unit on the battlefield, all in realtime! Being able to see their variables changing over time allows me to spot bugs easily and to check that the modelling is working as expected.

In fact this system has already found its first issue. If you look at the first screenshot at the top of this post you will see the cohesion (orange) and fatigue (blue) levels for all the units in the scenario over the first turn.

One thing I noticed is that for some orders, the units were not recovering from their exertions. Such an issue would have been very difficult to spot without this tool and may well have gone unnoticed whilst introducing many subtle issues.

The other thing that this system brings to the table is Hermes.

What’s Hermes?

Hermes is my new communications layer for the game. In fact, like Chronos and Atlas before it, it has been made generic enough that it can be used for any game or program.

The best thing about Hermes is that it hides the complexities of low level communications thus making it very easy to use. It also allows one to use a variety of low level protocols (simply inject them in), all whilst presenting developers with the same simple to use interface.

As expected, Hermes also handles all the other issues normally associated with communications, such as multi-threading and queuing. All in all, a very powerful system. 😎

In terms of the game itself, having Hermes in place means that multiplayer gaming is now a possibility – I just need make use of the technology that is now there!

However, there is still more work to do on the telematics system. My expectation is that I will be finished by the end of next week.

Time on Telematics!

Time on Telematics!

In fact my JIRA system says that I have just over a day’s worth of additional development to do – assuming my estimating was good. That’s after having invested nearly 4 days of effort into this system – 4 days well spent in my book.

I’ll leave you with a video showing how this new system works. Enjoy!



Improved Orders Symbology!

The changes between the two systems are quite subtle - that is until you start to see them moving. That said, what is immediately apparent here is that the new system's curved and straight arrows are now harmonised in terms of look and feel.

In a static picture the changes between the old and new systems are quite subtle. You have to see the system moving to experience the full effects of the enhancements (see video at the end of this post). That said, what is immediately apparent above, is that the new system’s curved and straight arrows are now harmonised in terms of look and feel.

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:

On the left is the old system. Here one can see that a unit will stop when its centre reaches the tip of the order arrow. However, on the right is the new system, where the unit will move right up until its leading edge arrives at the tip of the arrow.

On the left is the old system. Here one can see that a unit will stop when its centre reaches the tip of the order arrow. However, on the right is the new system, where the unit will move right up until its leading edge arrives at the tip of the arrow.

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:

Weeeeeeeeeeeeeee! Triangles!!!!!!!!!!!!!!!!!!!!!!!!! :P

Weeeeeeeeeeeeeee! Triangles!!!!!!!!!!!!!!!!!!!!!!!!! 😛 (Click for full sized image)

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!