Hearts of Iron IV Developer Diary | Tech

Hearts of Iron IV Developer Diary | Tech
Published by 14 Sep, 2022 0 likes

Bonjour friends, it’s your favourite Tech Lead again!

developer-diary-techhearts-of-iron-iv_5.png

Last year already I wrote to you in the final weeks leading to the release of the Barbarossa patch, and we draw close to the go-live of the Avalanche patch, here I appear again.

developer-diary-techhearts-of-iron-iv_2.png

Old Platforms Retirement PlanLike the future, technology is always in motion. As new platforms arise, olders need to be taken behind the barn and put down.

developer-diary-techhearts-of-iron-iv_3.png

Don’t worry, we’re not talking about Windows 7 (yet 😉).

developer-diary-techhearts-of-iron-iv_8.png

Despite the release of Windows 11, we have not elected to make a push to Windows 10 since Microsoft’s support for new tech on older releases is still fairly good.

developer-diary-techhearts-of-iron-iv_0.png

The same cannot be said for Mac and Linux, sadly. And so, starting the new 1. 12. 0 release, the minimum OS versions will be

developer-diary-techhearts-of-iron-iv_6.png

macOS 10. 14 (Mojave) and Ubuntu 20. 04 LTS (Focal Fossa).

developer-diary-techhearts-of-iron-iv_1.png

You will still be able to play older HoI versions on older operating systems by rolling back to previous branches, but Avalanche will refuse to start.

developer-diary-techhearts-of-iron-iv_4.png

Those updates are done in order to introduce new tech to our games (not just HoI) and ensure that all can be built on the same infrastructure within the studio.

New DefaultsLast year we introduced the option to run the game with DirectX11 rather than the venerable DirectX9.

After a long period of observation and very few issues observed, we have decided to make it the default.

The first time you start the Paradox Launcher on Avalanche, the game will perform a one-time upgrade of your settings from DirectX9 to DirectX11. New installations will also default to DirectX11.

If you notice any issue due to this change, first, please make a bug report, and then simply go to the settings page and set the renderer back to DirectX9.

Visually the game should look absolutely the same, but internally the tools that come with DirectX11 have helped us find a few sneaky graphical bugs that will be fixed in Avalanche, such as weird white squares appearing on the side of some tank models.

Performance ImprovementsThis is I bet the bit most of you were waiting for, the usual question of “will the new patch make the game run faster than previous versions? ”.

And I’m happy to say the answer is yes. The biggest improvement has been made to the map icons rendering (unit counters, factories, supply hubs, you name it).

The number of icons potentially displayed on the map had grown a lot since HoI’s release 6 years ago and the historical algorithm wasn’t cutting it anymore.

For example, here are what the FPS and frame time look like on Avalanche on my work desktop (i7700, NVIDIA GTX 1060, vsync off and 150 fps cap):Avalanche default

zoomAnd fully zoomed out:Avalanche zoomed outFinally zoomed back in, but with Speed 5:Avalanche at speed 5(If

you forgot last year’s dev diary, you can pop up the ingame profiler by typing imgui show profiler in the debug console).

Contrast those numbers with the ones from the current live build (Barbarossa 1. 11. 13):Barbarossa default

zoomNote that Barbarossa denotes rendering performance in “render time” rather than “frame time”, which is only the GPU part, while Avalanche counts both CPU and GPU rendering time, so the numbers look different.

Barbarossa zoomed outBarbarossa at Speed 5Since PDS games from HoI’s generation tie up rendering and game simulation, this will translate in faster tick speed (on top of a few smaller performance optimizations we added to the simulation itself).

Although, to be clear, faster rendering does not translate perfectly in faster game speed.

It mostly means a more fluid experience when playing (especially unpaused in Speed 4-5), and then some improvement to the speed of the game simulation.

Speaking of which, I have read and seen a bunch of “guides” to HoI performance over the past months sharing tips & tricks on how to improve the game speed, so let me give you mine: consider disabling VSync in your graphics settings, unless you have a high refresh rate monitor.

The way the game simulation waits for rendering to be done to continue, with a slow refresh rate your CPU might end up spending precious time waiting on your monitor VSync which is not ideal.

This root of the issue is difficult to address on HoI4 especially with DirectX9, but with DirectX11 becoming the default we will see if there is a way we can address this in the future.

No promises though. Final ThoughtsLast year I had some extra French content to show, but I’m afraid this patch I was a bit short on time to bring you more.

Although if you like Tech and History, I recently wrote a technical presentation on how to crack Enigma on a modern computer, with a focus on bringing the works of Marian Rejewski to light (as he and the Polish Cipher Bureau tend to be left aside in favour of Alan Turing and Bletchley Park in many stories).

There’s no recording available yet, but I’m scheduled to deliver twice more this year at tech conferences so they’ll be on Youtube eventually.

Speaking of Poland, have you all found my secret event in Barbarossa yet?

0 Comments:

Leave a Reply

Your email address will not be published.

See also in category Strategy