This week has been one of giving the system a good and thorough testing to make sure it is in a good position for the next major phase of development.
It saw many Line-Of-Sight bugs squashed. It seems that these were introduced as a consequence of the addition of the new Chronos subsystem.
It also saw the testing of other functionality that hadn’t really been put through the ringer before, including satellite mapping/overlays….
Some of you will know from previous blog entries and videos that Atlas – the mapping engine – supports a wide variety of mapping overlays, including satellite imagery.
When I went to test this functionality in the actual game, I found that it didn’t work 😐
The issues at hand were trivial in nature and it wasn’t long before the satellite maps were available for use in both the main game and scenario editor.
However, my joy at fixing the bugs was short lived when I noticed a slight design flaw in the system….
It seemed that there was no aesthetically pleasing way of including hills in satellite imagery. Sure you could add them, but this lead to a problem:
The user has to either leave the artificial hills visible on the map, which fails aesthetically and obscures much of the underlying satellite imagery. Or alternatively, the user could hide the hills. They would still be computed and available, just that they are hidden from view.
Whilst the latter option works well in terms of aesthetics, it fails in terms of usability. There is simply no easy way for a gamer to know where the hills are!
In fact the only way to work out where the hills are located is to scan the mouse across the map whilst reading the terrain output on the status bar at the bottom left. Not very user friendly at all!
To resolve this issue I decided to add contour lines to the system. This would allow a player to easily see where the hills are, whilst at the same time preserving the aesthetics of a satellite based map.
Coding these contour lines was fairly challenging, especially with regard to the elevation numbers. These had to be aligned directly on a contour and be facing the right way regardless of orientation.
To make things a little more tricky, the system would also need to calculate where to put a large enough gap into the contour line to prevent the elevation numbers from being obscured!
Changes would be needed to the Atlas mapping engine and to the map editor. The game and scenario editors would not need touching – the rather neat architecture of the system will allow these two applications to automatically pick up any mapping enhancements with no code changes 😎
After a lot of hammering away this is the result:
Not too bad? Eh?
These contour lines are strictly optional and can be turned off to preserve the look and feel of the original system. Alternatively, you could go the opposite way and turn off the hills whilst retaining the contour lines:
As you can see, this totally changes the look and feel of the map!
To allow the map designer to tinker with these contour lines, I had to update the map editor’s properties panes for contours:
It is now a tabbed control to accommodate all the other new controls!
Contour colour, opacity and even the position of the elevation numbers can be easily changed with this system:
With the contour system in place, it can now be used with satellite maps to great effect 🙂 In addition, all the built in features of Atlas are still available, such as Line of Sight:
As always, things are a lot easier to understand by simply watching the video (best watched in HD):
Next week I will be fixing more bugs. Once they are all squashed, we can move forwards and upwards!