I’ve been away for a while pursuing other hobbies. In this case Astro Imaging and Guitar. The former purloined my laptop, which necessitated the removal of all the development environment server components.
I had kept promising that I’d invest in the hardware and software to rectify this, but never got around to it until now!
In the end I invested in a dedicated server, updated all software licenses and adopted the very latest in Visual Studio tooling. The new development environment looks like:
With this new environment, I can work either from home or away. Regardless, I will always have access to the support services that I require.
Adding the dedicated server will safeguard the development environment and prevent any of my other hobbies from encroaching on its space!
The new environment also provides many benefits over the older one including password-less commits (everything now works with public and private crypto keys over SSH), release artefacts and much tighter integration between, builds, releases and my work tracking system.
As a few examples of the new tighter integration consider the images below:
Overall a much improved system that should impact on my productivity in a positive way.
That’s enough of environments. What have I actually been up to with regard to Ancient Armies?
So far, it’s been a relatively busy month…
Nearly 30 issues addressed!
Whilst impressive, this graph doesn’t actually tell you what I have been up to and where I intend to take the project.
After the development environment was restored, I decided to address a particular piece of technical debt that had been haunting the project for a long time. I had tried to avoid it as it was going to be one of those long and repetitive tasks…
The technical debt centred around naming conventions and general structure…
When the project was first started I knew nothing about C#. The result was that I had adopted many Java conventions. Alas, these conventions go against the grain of .net and more importantly had irritated me every time I wrote a line of code.
This situation had to be resolved as the engineering part of my brain was almost preventing me from coding – I simply don’t like writing code that I know isn’t correct – especially as I knew that any new code added would be increasing the size of the problem.
Besides, I figured that I would benefit by going through every source file in the project as it would help re-acquaint myself with the current state of play.
The Ancient Armies system is pretty big for a home project. It spans some 19 projects with a total of 34,641 manually written lines of code!
At first I thought I could find an automatic way of updating the code, but none of the approaches I tried worked. In the end I just bit the bullet and went through every source file updating it by hand.
Now that this is done, the code is in great shape. It follows the C# standards and takes advantage of many of the newer technologies offered by .net, such as async, anonymous methods and lambda functions.
The other advantage to come from this is that I can now come home from work and carry on coding using exactly the same styles and philosophies that I use professionally (I’m a web developer by trade). This eases the transition from my professional environment to my home environment – and vice-versa.
These changes are all well and good, but where are we with regard to Ancient Armies? What happened to column movement?
The above picture should give you a preview as to what I’m doing and the order that I’m going to be doing it in.
Thanks to tighter integration with Team City, my releases can now be properly planned. Right now, I’m on the final stages of testing the big code changes that I have made. Things are looking good so far, so I anticipate that release 0.2 will be completed in the next day or so.
If you look carefully at the screenshot you will see that column movement is still there, but I want to address two other rather important issues before I get to that.
The first issue is serialisation, or put simply, the way the system loads and saves its data. The current system is a royal pain and has cost me a lot of wasted time and effort. Its biggest issue is that it is very brittle to change. This means that created maps, armies and scenarios soon become incompatible as coding proceeds.
The upshot of this is a lot of rework having to continually recreate these assets. Besides, in the real world, post release, I don’t think the users would be very happy if I released an update that broke all their saved data…
This is why I want to address this one early. The earlier it’s fixed, the more time it will save me! In addition, just like my previous coding updates, this is one of those issues that only gets bigger the longer you leave it.
Once serialisation is done, the next thing on the hit list are the internal mathematics systems. The specific issue here is that the system currently uses a mixture of radians and degrees throughout – partly because of my inability to visualise radians to the same degree as degrees! (see what I did there? 😛 )
Having two competing units within the system means that many unnecessary calculations are being performed from one to the other and back again every single frame render. Utilising two units can also cause confusion as I try to work out which units I should be using at any particular point.
Right now many of the subsystems support both. Removing degrees from the system will simplify everything and reduce the constant conversion overhead that’s currently taking place.
Architecturally, I had decided that viewing angles in degrees is a user interface concern and not something that the back end libraries should be concerned with. After all Direct-X only works with radians – only the users will want to see degrees and these conversions can be taken care of in the user interfaces.
Once this critical work is done, I will end up with a simpler system that has better performance characteristics – not that Ancient Armies is a slouch!
Only after these two issues have been addressed will I move back onto column movement – something I’m really looking forward to nailing.
In terms of blog updates, my intent is to limit them so as to maximize time spent coding. To that end, the next blog update will be made after the column movement system is in place. There is a LOT to this system, so I expect this to be some time down the line.
In the mean time I will leave you individual screenshots of the various systems that make up Ancient Armies – enjoy 🙂
That’s it for this post – I’ll be back when I have some cool column movement to show you 🙂