• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Developer Diary | Tech

Bonjour friends, it’s your favourite Tech Lead again!
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.

Old Platforms Retirement Plan

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

Don’t worry, we’re not talking about Windows 7 (yet ). 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.

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 macOS 10.14 (Mojave) and Ubuntu 20.04 LTS (Focal Fossa). 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.

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 Defaults

Last 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.​
image8.png

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 Improvements

This 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):​
image2.png

Avalanche default zoom

And Full zoomed out:
image5.png

Avalanche Zoomed out

Finally zoomed back in, but with Speed 5:
image1.png

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):​
image6.png

Barbarossa default zoom
Note 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.​
image4.png

Barbarossa zoomed out

image3.png

Barbarossa at speed 5

Since 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 Thoughts

Last 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?​
image7.png

That’ll be all for today, but I’ll be happy to answer your questions, tech or otherwise!​
 
  • 65Like
  • 13
  • 10Love
  • 2
Reactions:
That's awesome to read but... still no achievement DD? :oops:
 
  • 14Like
  • 1Haha
  • 1
Reactions:
What about performance late game? This is the real problem, not early game.
 
  • 32Like
  • 6
  • 1
Reactions:
Looking forward to seeing these performance improvements in person. I don't have a Herculean gaming PC, but I do have a very good one and hopefully, the improvements will be noticeable.
 
  • 5Like
Reactions:
Love the Wojtek easter egg for Barbarossa ❤️
And i agree with you the polish are pretty much left in the dark when it comes to enigma, i'm not saying that good old Turing should not be remembered, but at the same time i wish that ALL that contributed will be given a fair piece of spotlight.....anyway i digress. I do have a small question tho, regarding if you guys plan to add more easter eggs like the one of Wojtek or no? Thanks in advance and keep up the amazing work :) @MatRopert
 
  • 7
Reactions:
Much appreciated. My current rig was brand new when this game launched, but now it's starting to look a bit shakey.
 
  • 1Like
Reactions:
When I read
The same cannot be said for Mac and Linux, sadly.​
My heart rate shot up.... :oops: knowing what Shams said a few years ago about PDX phasing out Linux support....

And so, starting the new 1.12.0 release, the minimum OS versions will be macOS 10.14 (Mojave) and Ubuntu 20.04 LTS (Focal Fossa). 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.​
Phew!

That's fair enough on the Linux side. I do still have HoI4 installed on an old Ubuntu 18.04 system, but I'm aware it's high time that it was updated.

Thank you to Mathieu and the rest of the tech team for continued work on performance. I'm usually playing on PCs around the minimum requirements, so I do appreciate their efforts.
 
  • 8Like
Reactions:
Hey Mat, I hope you finally get around to removing all the always = yes triggers for the division name lists. They are not needed and just an unnecessary burden on performance since they were introduced
 
  • 6
  • 1Like
Reactions:
Really great update. Relieved to hear Ubuntu is still supported! And I appreciated you unbearlievable leader too!

Would love to hear what's on the roadmap for future tech upgrades and performance improvements
 
  • 3Like
Reactions:
Looking forward to seeing these performance improvements in person. I don't have a Herculean gaming PC, but I do have a very good one and hopefully, the improvements will be noticeable.
Hell I have a fairly high end PC and whilst the game speed runs very fast, when I have it on five speed I get like 30fps. I would honestly expect at least 50 and hopefully I can get more after this update.
 
  • 2Like
  • 1
Reactions:
What about performance late game? This is the real problem, not early game.
It should be a bit better due to this (and a few other improvements made). Truth be told I was hoping to get our hardware lab to give us a new assessment like we did last year but sadly they are kinda busy with this Victoria 3 thing coming soon ;) .
I don't see a true better performance lategame? What about that? Are you going to answer or is paradox just gonna say the same old...

"We use only one CPU" although in 2016 like every CPU had multiple cores...
You would pleased to hear that HoI has been using multiple cores since release and we have since tried to move more game systems to the multithreaded update pass, but it's not always an option.
Are we ever gonna be as good as CK3 at core utilization? Most likely not, but then again that game is based on tech that is 5 years younger than HoI.
If you want more details I can recommend this watch.

@MatRopert Would you be to post a link to that YouTube video when its done?
There you go! Apologies for the first minutes of recording, we had setup the wrong mic. Goods news is, we should get 2 more recordings from CppCon and Meeting C++ later this year.
 
  • 14Like
  • 11
Reactions:
Hey Mat, thanks for sharing this!

If you have the time, I would love to know how you are handling performance improvements in the Hoi4 team.

  • Do you do them "as you get by" while changing other code and then stumbling over something like "oh, this could be optimized!"?
  • Do you have a list of things that need optimizing and that you try to get to when planning your next patch/DLC?
  • Or do you just have a big note somewhere hanging around that says "PERFORMANCE!" but you don't know yet what to do and when someone is assigned that task, they just look through the code/profilers and try to find something?
Also I'd love to know, if there are optimizations that you and the team knows off, that would have a greater impact on performance but you haven't yet got the time/resources to implement them?

Thanks in advance :)

P.S.: You can get as technical/detailed as you like and your time/word count allows :D
 
  • 2Like
Reactions:
I don't see a true better performance lategame? What about that? Are you going to answer or is paradox just gonna say the same old...

"We use only one CPU" although in 2016 like every CPU had multiple cores...
Same game engine, so it still is one cpu core and minor use of couple of others.
You need HOI5, with new game engine, to get late game performance update.
 
  • 11
Reactions: