Finally, Ancient Armies has hit a major milestone – we can now issue orders to units and have them act on those orders! For the first time ever, units can now move in reaction to orders placed in their orders queue.
Why is this a major milestone?
A lot of game code framework had to be put in place to realise the dream of moving units. This code effectivelly marks the transition from what was a data-modelling exercise to one of writing the actual game engine itself!
To enable unit movement the following subsystems had to be added:
- Map Symbology Overlays
- Unit Order Queues and processing
- Artificial Intelligence
- Hardware agnostic game loop
- Game time flow management
- Unit selection processing
That’s a lot of new subsystems. Between them all, they define what is essentially the ‘meat-and-potatoes’ of the game.
The decision to leave the Army and Scenario sub-systems partially completed (as reported here) was vindicated by this software development phase. Both of these sub-systems got modified to support the needs of the parent game. This has saved a lot of re-work and a lot of pre-planning!
The new game system now supports the following:
- You Plan, I Plan, We Go turns (with a twist 😉 )
- 15 Second game turns of simultaneous movement
- 60 hz refresh rate
- Game time compression from 1:1 up to x50
- Guaranteed and realistic animation speeds – regardless of platform
- Designed and built to support artificial intelligence from the ground up
- Unit multiple selection
With the above framework in place, it should be relatively easy to add the other orders that the system requires. All that I need do is follow the rules of that framework and let it take the main burden!
Issuing orders to a unit is simple:
The eagle eyed amongst you will have noticed the yellow coloration of the unit shown above, this is due to the unit selection mechanism:
Internally the mechanism supports the multiple selection of units, though only single unit selection has so far been surfaced to the user interface.
All issued orders will be accompanied by their own unique map overlay graphics as shown below:
The system also supports the queuing and prioritisation of orders from both a human and the 2 layer artificial intelligence source.
The game handles many simultaneous orders with ease:
As a unit manoeuvres the system determines whether it has passed the success criteria for the current order. If so, that order is removed from the queue. The system then uses a prioritisation mechanism to pick the next order it needs to execute.
The perceptive amongst you probably spotted the time compression controls on the main toolbar:
Adding a time compression system was remarkably trivial thanks to the coding of time flow management within the game!
Anyways, whilst a picture paints a 1000 words, a video paints even more! So here is a 10 minute video showing the Ancient Armies orders and movement system in operation:
Time for a well earned rest!