TUXDB - LINUX GAMING AGGREGATE
 NEWS TOP_PLAYED GAMES ITCH.IO CALENDAR CHAT WINE SteamDeck
 STREAMERS CREATORS CROWDFUNDING DEALS WEBSITES ABOUT
 PODCASTS REDDIT 

 

SUPPORT TUXDB ON KO-FI

MENU

ON SALE

New Twitch streamer aggregation implemented (#FuckTwitch) due to Twitch's API issues (more info on my Discord )


Name

 Hearts of Iron IV 

 

Developer

 Paradox Development Studios 

 

Publisher

 Paradox Interactive 

 

Tags

 Strategy 

 

Simulation 

 

Singleplayer 

 

Multiplayer 

 

 Co-op 

Release

 2016-06-06 

 

Steam

 9,99€ 8,74£ 9,99$ / 75 % 

 

News

 437 

 

Controls

 Keyboard 

 

 Mouse 

 

Players online

 37298 

 

Steam Rating

 Very Positive 

Steam store

 https://store.steampowered.com/app/394360 

 

How long to Beat

Main Story

 32 Hours 

 

Main Story + Extras

 100 Hours 

 

Completionist

 250 Hours 

 

SteamSpy

Peak CCU Yesterday

  

Owners

 1,000,000 .. 2,000,000 +/-  

 

Players - Since release

  +/-  

Players - Last 2 weeks

  +/-  

Average playtime (forever)

 10632  

Average playtime (last 2 weeks)

 813 

Median playtime (forever)

 4402 

Median playtime (last 2 weeks)

 750 

Public Linux depots

 Hearts of Iron IV Linux [135.44 M] 


DLC

 Hearts of Iron IV: Sabaton Soundtrack 


 Hearts of Iron IV: Together for Victory 


 Hearts of Iron IV: Death or Dishonor 


 Hearts of Iron IV: Sabaton Soundtrack Vol. 2 


 Hearts of Iron IV: Waking the Tiger 


 Hearts of Iron IV: Man the Guns 


 Hearts of Iron IV: Axis Armor Pack 


 Hearts of Iron IV: Radio Pack 


 Hearts of Iron IV: La RĂ©sistance 


 Hearts of Iron IV: Allied Armor Pack 


 Hearts of Iron IV: Allied Speeches Music Pack 


 Hearts of Iron IV: Battle for the Bosporus 


 Hearts of Iron IV: Eastern Front Planes Pack 


 Hearts of Iron IV: Eastern Front Music Pack 


 Hearts of Iron IV: No Step Back 


 Hearts of Iron IV - Expansion Subscription 


 Hearts of Iron IV: By Blood Alone 




LINUX STREAMERS (11)
guyvernksittingduck01nofoxgiwnfee_modelbuilding
bananas369zergviph4ckd3veelix7
besserwisserersilentkenny093kuraihakurei_




Developer Diary | Performance


Bonjour nouveau, friends! I dont know if the third time makes it a tradition but I appear once more before release to give some updates from HoIs tech team.

If you havent seen much of me since last year, its because Ive partly been busy with **REDACTED**, **REDACTED** and also with **REDACTED**, but my attention has fully returned to HoI for the last couple months.

So, whats new with HoIs tech in 1.13 Stella Polaris?

[h3]Mines, or the greatest urban legend[/h3]

First off, great news, naval mines will not slow down the game anymore! Hurray!


Except thats a lie. The mine lag I keep reading about in some community house rules isnt a thing. Hasnt been for 2 years. I know because I fixed it in 1.11 (Barbarossa). But dont feel bad for missing the notice, as it turns out this change from December 2020 (shipped in 2021 with No Step Back) never ended up in the changelog.

commit da0ce4ac94ba1938459ffb6abe3bf2b0cd4bab1e
Author: Mathieu Ropert
Date: Mon Dec 14, 17: 38:59 2020 +0100

[X] Fixed performance issue when mines are used


Oops.

But I have even better news. While the usage of mines didnt slow the game down, the existence of mines as a concept was still incurring a performance cost, whether you used them or not. This has also been greatly improved for 1.13.

So go ahead. Go nuts. Mine the whole ocean. See what happens.


[h3]V-Sync, G-Sync, Free-Sync, NSync[/h3]

While there is no big platform update this time (supported operating systems remain the same), we have introduced some small improvements to rendering tech in HoI.

The main one is support for variable refresh rate monitors and GPUs. If you use DX11 (the default since 1.12) and your hardware supports it (and you use Windows 10 or higher), you should get more FPS with vsync off. On my NVIDIA RTX 3060 at work, it goes up from 140-150 FPS in 1.12 to about 190 FPS in 1.13 when the game is paused.

Im not saying youll actually be visually able to tell the difference, but you wouldnt be our fans if you didnt like when numbers go up, so this should give you some stonks for free.

Weve also tweaked a bit how the game renders when unpaused, especially when your hourly/daily tick starts getting slower than 16/33/50ms (depending on game speed). Long story short, the cost of keeping the FPS going steady when the simulation gets more CPU heavy has been improved, meaning better FPS and less perceived lag especially in speed 4 and 5.


[h3]General performance improvements[/h3]

I used the mines example earlier as a teaser, but in general this update comes with a good amount of performance improvements. Those were partly inspired by having spent time looking at our other titles and a bunch of secret stuff I sadly cannot delve into, and partly just due to getting a fresh set of eyes on old problems.

Heres some side by side comparison between 1.12 (Avalanche) and 1.13 (Stella Polaris).

First, a fresh new 1936 game on my work i7-12700k and its 20 cores:

HOI4 1.12 Avalanche - 1936 - Intel i7-12700k


HOI4 1.13 Stella Polaris - 1936 - Intel i7-12700k

And heres 2 similar-ish saves from 1943, same machine:

HOI4 1.12 Avalanche - 1943 - Intel i7-12700k


HOI4 1.13 Stella Polaris - 1943 - Intel i7-12700k


This might look a tad overwhelming if youve never seen the in-game profiler from previous dev diaries (console command imgui show profiler to make it pop in game). The bits I would like to direct your attention to are the Ticks per second and Last 24 ticks average that give you a rough idea of how fast the game is going.

Long story short, the 1936 scenario goes from a 15ms average to 10ms average for the hourly tick (the time it takes to simulate one in-game hour). Or if you prefer, from 42 to 64 hours simulated per second.

In the 1943 scenario, where there are way more wars, divisions, fleets and planes involved, we go from 43ms to 29ms hourly tick average. Or again, up from 17 to 27 in-game hours simulated every real world second.

In both cases, this makes the simulation about 1.5 times faster. In practice, the perceived speed will be a bit less because we still need to account for GPU time and the like, but it should be fairly noticeable still.

Of course, we understand that not all of you are running top of the 10th+ generation i7 CPUs, so it would only be fair to also look at what it means on lower end machines. Luckily, I also have access to a modest AMD Ryzen 3 1200, a quad core CPU that the internet tells me is roughly equivalent to an Intel i5-7400. Brace yourselves for more graphs.

First, 1936:


HOI4 1.12 Avalanche - 1936 - AMD Ryzen 3 1200


HOI4 1.13 Stella Polaris - 1936 - AMD Ryzen 3 1200

And then the same 1943 saves:


HOI4 1.12 Avalanche - 1943 - AMD Ryzen 3 1200


HOI4 1.13 Stella Polaris - 1943 - AMD Ryzen 3 1200

First off, if there was still any doubt in your mind, yes, switching to a beefier machine will absolutely make HoI run faster. As you can see in the numbers here, this ran about 3 times slower than the high end 20 core machine from before.

Second, you can also see that 1.13 still performs better than 1.12 (about 25-30% faster), but not as much as on a high end machine. Why? you ask. Because threads!


[h3]HOI4: You Can(not) Multithread[/h3]

It is a recurring misconception that Paradox games dont use more than one thread. This is obviously not the case. Ive been talking about it since my days on Stellaris.

But it is true that some parts of the game simulation are better than others at making use of many cores. And once theyve been made to only use one core, its usually quite difficult to change as the game simulation starts relying on it.

This all comes back to the olden days where Europa Universalis was a board game ported to PC. After all, it is fairly common for those to be designed in a way where each actor takes a turn. The German player moves all his troops on the board. Then the British. Then the Soviets. Etc This is a very serial process. Easy to understand and design, but slower than if every player could go at the same time. And of course it is very hard to change after the fact, because if everyone suddenly starts moving at the same time then you get conflicts and need rules to identify and resolve them.

Crusader Kings 3 resolved most of those issues by taking a radically different approach to its technical design, but we obviouslydont have that luxury. And no, unlike what Ive heard before, this has little to do with the engine. Understand that ol Clausewitz (and its friend Jomini) are mostly concerned with graphics, networking, loading and saving files, that kind of stuff. The bulk of the performance bottleneck isnt there, its in the game simulation and thats almost entirely up to each game to decide how they wanna approach it and that decision is usually made (and hard to change) in the first years of the game development, before it even releases.
Still, in this patch we were able to identify places where we could break that turn-based design and replace it with a simultaneous process and nobody would be the wiser. Which allowed us to throw all your cores at the problem, rather than rely on the one.

This is, I believe, the main reason why you will notice more improvement the more cores you have. For example, if a process took say, 2ms before. Now it will take 0.5ms with 4 cores (2/4) and 0.1ms with 20 cores (2/20), roughly speaking. Heres a rough outline of HoI4 CPU usage in a late 1942 save with 20 cores for example:


Notice the CPU chart at the top which shows how many cores are being used at a given time. Ideally youd want it to be fully green all the time, but this is what we get with the upcoming release of HoI4.

For those of you who are more technically inclined, I can recommend you this (updated) talk Ive given at ACCU 2023 about multithreading challenges in PDS Games.

Multi Threading Model in Paradox Games: Past, Present and Future - Mathieu Ropert - ACCU 2023
[previewyoutube=M6rTceqNiNg;full][/previewyoutube]

And with that, Ive just noticed something off while making the screenshots for this dev diary, so Ill go back to investigate and see if theres some more we can do to improve even more in the post-release patches

I will leave you with this side by side comparison of letting the game run for 30 seconds on 1.12 vs 1.13. Keep an eye on the date/time at the top.

[previewyoutube=kaI4xFN_QIQ;full][/previewyoutube]


[ 2023-10-09 15:07:06 CET ] [ Original post ]