Post feature RSS Darkest Hour - Dev Diary #2 - Maps

This dev diary is all about Darkest Hour's new map.

Posted by on

Darkest Hour - Dev Diary #2 - Maps

Follow us on:

It is Monday, and as promised, we are going to reveal a little more about Darkest Hour.
But let us start with a few words from Eric 'Eginhard' who defined most of the concepts of the main map (used in the grand campaigns).

The Holy Rule


The basic problem with game design is to find the best compromise between simplicity and realism. Knowing the community's (and our own) fondness for historical realism, and at the same time the needs of the Europa engine to provide an enjoyable game, we had to resolve the same dilemma with the map.

The first issue that we dealt with was to establish specifications that would make sure that our map would not completely break the game balance, especially regarding artificial intelligence capabilities. After many discussions during the preliminary phases of map development, three major specifications were established.
First, in order to keep consistent with the massive improvements made by Martin with game speed, it was agreed to keep the overall number of provinces below 3,000. It was soon discovered that only the actual number of province IDs used had influence on game performance, which allowed us to put the province number limit to 10,000 (or even higher for future modders' use) as well as to suppress all other limits regarding map modding.
Second, given that military artificial intelligence may have trouble with handling fronts with too many connections (that is, when attackers could come from too much sides), it was decided that no province would have more than six connections with its neighboring provinces. Each time where a province had borders with seven or more other provinces, we suppressed extra connections, either on geographical grounds (major obstacles such as mountains, escarpments, lakes...) or by redrawing it slightly to make the absence of connection "visually acceptable". After some jokes among the team, this rule became known in our team as the Holy Rule. Nevertheless, this rule admits arbitrary exceptions for gameplay reasons. For instance to ensure fluidity in the Belgian front, Lille has seven connections instead of six.

The Holy Rule can be summed up in two articles:

  1. A province shall not have more than six connections with other provinces;
  2. If it proves impossible to comply with article 1 without breaking all you have done previously, skip article 1.

Third, we were asked to put emphasis on 1914-1945 era. This means that whenever eras borders would conflict, borders from the world wars era would prevail. It also means that some areas would have more attention than others, so you'll find far more provinces in North Africa than in Sub-Saharan areas. This point has never been fully consensual in our team and has evolved along the overall concept of the game, but combined with the other two specifications it gives the map its current look. Map design is now frozen until release (to ensure a proper game balance and the implementation of other features), but this doesn't mean that it won't change in the future.

All combined, these three major specifications brought us on the verge of insanity more than once, especially when you compare them with our methodology and our desire to achieve the best possible map in terms of geography, history and realism. At one point, I even felt schizophrenic, but now, we do feel better.

So what's new?


Now let us have a look at the things you can see.

Our map originally started as the E3 map, as many of you already realized from the screen-shots. But as beautiful as the E3 map was, it soon became clear that it had severe weaknesses and that was not exactly what we had in mind for our own game.
The biggest was that it was of course limited to 2607 provinces, which were just not enough.
Another one was that it took no account of what became the so-called "Holy rule" of map design.
Others were not real weaknesses but different design choices.

  • Optical changes

We decided to switch back to English names for all provinces in order to keep things as user-friendly as possible for the majority of players.
We switched to a new font, Calluna, that is a lot clearer and better to read on higher zoom levels.
We also switched back to a dotted border concept which really brightened up the whole map.

  • General concepts

We obviously kept the general guidelines of E3 to try to get as close as possible to historical borders when setting up provinces.
We removed mini-provinces that were too small to host counters, unless they were of key importance during the World Wars.

  • Optical gimmicks

Every province can now have its own illustration. We can add unique capital icons for each province. We also no longer use the HOI2 beaches icons, as they didn't really fit on a map that uses realistic coastlines and we instead included a new small icon.

  • Things you don't see at first glance

The terrain types and resource distribution is based on historical data and is a big change compared to HOI2. You will be pretty surprised and curse a lot at first when your old strategies lead you in a swamp or forest that wasn't there before.
Of course, the climate zones are as close to the real climate zones as we could get as well.
We also tried to adapt the design of the map to pay tribute to little details like the Trans-Siberian Railroad or the Burma Road.

  • The things you don't see at all

Let us start first with the obvious, all limits are gone.
There is no limits on province number. Well, to be really honest the current limit is set to 10000, but if you can come up with a map featuring more then 10000 provinces, I will get you a patch with a higher limit the next day.
There are no limits on connections.

  • Gimmicks for modders

Everybody knows we love modders. Thus we have added extensive map related debug logs with warnings for misplaced map icons (grouped by icon), possible wrong climate zones, missing sea province definition in the province.csv file and suggestions for which sea province would be the best choices. There are also warnings for wrong or not ideal sea province definition in the province.csv and suggestions which sea province would be the best choices, as well as logs about resource/IC distribution by province or for whole countries.
Modders will also find analysis of connections per province in different variations (depending on what you are doing, you might prefer one presentation or the other, this is mostly interesting in regard of the Holy Rule that we introduced above).
And finally, analysis of distance between provinces are also available (I will explain in the next paragraph what this is about).

  • A new heart

Here is the first of the really big new features to be revealed, and I am pretty excited about it.
HOI2 distance calculation was based on pixel coordinates defined in the province.csv file (the amount of pixels between one airbase coordinate and another to be exact).

The whole thing started like this.
One of the biggest problem with HOI2 maps was the size of the oceans.
It was a bit of a compromise, according to the range calculator for the game, the world was 10,000 km in circumference. While that might be fine per se, it created other (and worse) problems considering that large amounts of the Pacific have been shrunk.
It could therefore never be possible to really fix the naval combat system unless we had more reasonable ocean cartography. If the map had to be expanded, how about doing something to increase the relative size of the oceans, so that the Mediterranean is not half the size of the Atlantic?

What have we done about this?

In Darkest Hour, we replaced the old HOI2 system with a new distance calculation which is based on real geographic coordinates (the old engine can of course still be activated in the misc.txt file, as most new features, it is optional to use the new calculation).

Most of you are now asking: "Why should I care? What is so exciting about that?"

Well let us think about it.
You can now see real distances between one province and another, the distance between Berlin and Moscow is as far in the game as it is in reality.
While this is cool in itself, it becomes even cooler when it comes to sea provinces. With HOI2, all you got was wrong distances based on the way the map was morphed to display a 3D earth on a 2D map.
When you used to have, for instance, a giant Mediterranean sea, and a tiny Pacific ocean compared to reality, the game now features real distances.

The whole thing gets especially important when it comes to battle-scenarios, which use new and more detailed maps (that we will show you later ).
As in HOI2, all distances were based on pixel coordinates you ended up with provinces that were hundreds of kilometers far away in-game, although they were maybe 20kms away from each other, only because you had increased the scale of the map.
Even with massive workarounds and modified units speeds you couldn't get it completely right.

Still not excited?

Alright, what does it mean for the casual player who doesn't care about realistic distances? And why should you as a map modder go through the hassle of creating coordinate tables?

The simple answer is performance.

The following table shows the time that it takes with Darkest Hour compared to Hearts of Iron II to perform distance calculation (more than one calculation taken into account to get a nice average) :

code:
HOI2  DH  
188   94    
187   109
203   109  
203   94    
219   94    
218   94    
218   109      
203   110    
203   110        
1842  923      Total
205   103      Average

That is a 45-50% reduction in calculation time for each distance check. The artificial intelligence does multiple of those for each division every tick to decide about unit movements, and even more for air units.
Of course a lot more things influence game performance, but this one is a good chunk and led to a noticeable performance boost.

The best thing about this improvement is that it actually has a higher impact when the game progresses as the amount of units increases and war breaks out. The more distance calculations the engine does, the higher the performance gain compared to vanilla.
Same goes for maps that have more provinces.

We do regular tests to check performance, the old Doomsday (fictional WW3) scenario shows the impact pretty well.
We compared the average cycle time of different game versions between 1936 (the world at peace) and the Doomsday scenario with fighting all over the place.

Switching to the new distance calculations increased game speed by up to 10-15% in scenarios with heavy fighting compared to the same Darkest Hour version that used the old calculation model.

code:
  Game       1936    DD          1936/DD %
    Arm 1.2    25'       72'          34.7 %
    Arm 1.3b   25'       59'          42.4 %
    DH 0.32    24'       38'          63.2 %
    DH 0.36    24'       36'          66.7%
    DH current 24'      30-32'      80-75% (in 3 tests) This with the new distance calculation

n Armageddon 1.2, game speed in DD scenario was ~1/3 of the speed in 1936.
In Armageddon 1.3b it is increased by ~8 points to 42%.
In our current DH version, it is at 75-80%, or only 20-25% slower then in 1936

We of course included the necessary coordinate tables for our own map, and the old HOI2 map, so that all mods that are based on HOI2 can benefit from the new system.
I will not say that it is not intensive work to set up those coordinate tables, because it is! But it is definitely worth it to do so for your own mod maps, and once you get in a rhythm, it is not that bad.
We will support mods conversions from HOI2 to DH anyway.

You can get the coordinates straight out of Google Earth, and with the right settings and tools to copy the coordinates, it gets pretty fast (at least compared to the time involved to actually draw a new map).


And that's it for today guys, I hope you enjoyed it.
Of course this thread is open to topic related questions.
See you next Monday for a new development diary.


Björn 'Nathan' Winkler,

Darkest Hour Developer
- Map Implementation

P.S.:

As promised screenshots of the USA

Darkest Hour Screenshot

Darkest Hour Screenshot

Darkest Hour Screenshot

Comments
AirborneSn1p3r
AirborneSn1p3r

Great, i think more people on moddb really need to see this

Reply Good karma Bad karma+1 vote
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.