Stellaris Dev Diary #181 : Threading and Loading Times

Stellaris Dev Diary #181 : Threading and Loading Times

  • Crusader Kings III Available Now!

    The realm rejoices as Paradox Interactive announces the launch of Crusader Kings III, the latest entry in the publisher’s grand strategy role-playing game franchise. Advisors may now jockey for positions of influence and adversaries should save their schemes for another day, because on this day Crusader Kings III can be purchased on Steam, the Paradox Store, and other major online retailers.


    Real Strategy Requires Cunning

Olterin

Major
66 Badges
Jul 15, 2015
629
426
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings III
  • Cities: Skylines - Parklife Pre-Order
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Distant Stars
  • Surviving Mars
  • Cities: Skylines - Parklife
  • Age of Wonders III
  • Cities: Skylines - Green Cities
  • Crusader Kings II: Holy Fury
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Magicka: Wizard Wars Founder Wizard
  • Victoria 2
  • Shadowrun Returns
  • Europa Universalis IV: Dharma
  • Warlock: Master of the Arcane
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Surviving Mars: First Colony Edition
  • Stellaris: Megacorp
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Golden Century
  • Crusader Kings II: Conclave
  • Stellaris: Lithoids
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Europa Universalis IV: Cossacks
  • Stellaris
  • Stellaris - Path to Destruction bundle
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
Okay,
Then I've obviously missed something somewhere.
DX12 and vulkan can both do low level (low overhead) resource and task management.
DX12 and vulkan can do graphics.

What do you mean by simulation thread, and how does that translate to dx11 doing something that opengl and vulkan cannot?
"Simulation thread" in this case refers to game logic simulation, not the graphical simulation. Stuff like "fleet A is moving from here to here, what's the best path". This isn't to say that some of these things cannot be written into "GPU code" but most of them do not require that high a degree of parallel calculations.
 

ProtoformX

Second Lieutenant
16 Badges
Jun 27, 2017
154
7
  • Europa Universalis IV: El Dorado
  • Magicka 2
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Dharma
  • Europa Universalis IV: Golden Century
  • Imperator: Rome Sign Up
  • Stellaris: Lithoids
  • Hearts of Iron IV: La Resistance
  • Crusader Kings II: The Old Gods
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Mare Nostrum
"Simulation thread" in this case refers to game logic simulation, not the graphical simulation. Stuff like "fleet A is moving from here to here, what's the best path". This isn't to say that some of these things cannot be written into "GPU code" but most of them do not require that high a degree of parallel calculations.
Sure, but this other guy's post was saying it can't be in vulkan and only in dx11.

My question was less about the details of code and simulation, and more about what capabilities dx11 has that opengl and vulkan doesn't.
That pdx would avoid using it,
 

KaiserTom

Private
45 Badges
Feb 12, 2012
10
16
  • Victoria 2: A House Divided
  • Crusader Kings II
  • Victoria 2: Heart of Darkness
  • Stellaris: Digital Anniversary Edition
  • The Showdown Effect
  • Warlock: Master of the Arcane
  • War of the Roses
  • Cities: Skylines
  • Cities: Skylines - After Dark
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Supreme Ruler 2020
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Surviving Mars
  • Surviving Mars: Digital Deluxe Edition
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
  • Surviving Mars: First Colony Edition
  • Prison Architect
  • Surviving Mars: First Colony Edition
  • Europa Universalis III: Chronicles
  • Arsenal of Democracy
  • Cities in Motion 2
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sunset Invasion
  • Stellaris: Synthetic Dawn
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • Dungeonland
  • Europa Universalis III
  • Divine Wind
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Heir to the Throne
  • Leviathan: Warships
  • Magicka
  • Victoria: Revolutions
  • Sword of the Stars
  • Victoria 2
  • Sword of the Stars II
Sure, but this other guy's post was saying it can't be in vulkan and only in dx11.

My question was less about the details of code and simulation, and more about what capabilities dx11 has that opengl and vulkan doesn't.
That pdx would avoid using it,
I never said it couldn't be done in vulkan, only that doing so wouldn't deliver any benefits. And they are not "avoiding" using it, but instead the act of moving to another API comes with a cost in terms of programmers that need to understand and code for it, when they are already well acquainted with using DX. You risk introducing a lot of bugs.

Why fix what isn't broke or slow? Why waste manhours switching to a new API for nearly zero overall benefit? Yes Vulkan can do certain compute tasks, but it doesn't magically make it easier to parallelize things. That is still dependant on the code, the problem, and the abilities of the programmers. If they can't parallelize the game logic thread as is, switching to Vulkan isn't going to do anything to alleviate it.
 
  • 3Like
  • 1
Reactions:

ProtoformX

Second Lieutenant
16 Badges
Jun 27, 2017
154
7
  • Europa Universalis IV: El Dorado
  • Magicka 2
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Dharma
  • Europa Universalis IV: Golden Century
  • Imperator: Rome Sign Up
  • Stellaris: Lithoids
  • Hearts of Iron IV: La Resistance
  • Crusader Kings II: The Old Gods
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Mare Nostrum
I never said it couldn't be done in vulkan, only that doing so wouldn't deliver any benefits. And they are not "avoiding" using it, but instead the act of moving to another API comes with a cost in terms of programmers that need to understand and code for it, when they are already well acquainted with using DX. You risk introducing a lot of bugs.

Why fix what isn't broke or slow? Why waste manhours switching to a new API for nearly zero overall benefit? Yes Vulkan can do certain compute tasks, but it doesn't magically make it easier to parallelize things. That is still dependant on the code, the problem, and the abilities of the programmers. If they can't parallelize the game logic thread as is, switching to Vulkan isn't going to do anything to alleviate it.
What you said was changing the API would be meaningless. But that's fine, I accept your argument that changing the API is problematic at each major step.
Programmers to learn, implementation (game coding), and retroactive change later on (patches+dlc).

However you've made a few errors.
Last I checked, DX API is windows exclusive, PDX titles are not. They're cross platform.
OpenGL and Vulkan are cross platform.

Vulkan is supposed to be much more accessible than opengl, and much faster. In the same kinds of ways DX12 is better and faster than 11 and 10 and 9.

Vulkan benchmarks have better results when compared to dx12. Maybe not more than 15%, but more than none.

While changing dx9 to 10, to 11, may not seem like major changes in software code; when contrasted against opengl/vulkan.
There are valid and nontrivial reasons for embracing vulkan.

But maybe it is as you say, the cost at the moment is much higher than perceived benefits from changing API to vulkan.

However my original question was separate to all of that.
What I was asking was- what can dx11 and 12 do that vulkan cannot?
 
Last edited:
  • 2
Reactions:

mag_zbc

Second Lieutenant
50 Badges
Jun 3, 2016
154
12
  • Crusader Kings II
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: The Republic
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Charlemagne
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Green Cities
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Rule Britannia
  • Age of Wonders III
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
  • Stellaris: Distant Stars
  • Europa Universalis IV: Dharma
  • Shadowrun Returns
  • Shadowrun: Dragonfall
  • Cities: Skylines Industries
  • Stellaris: Megacorp
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines - Campus
  • Stellaris: Ancient Relics
  • Hearts of Iron IV: Death or Dishonor
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Mare Nostrum
  • Hearts of Iron IV: Cadet
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Hearts of Iron IV: Together for Victory
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Synthetic Dawn
  • Stellaris
  • Shadowrun: Hong Kong
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Cradle of Civilization
  • Hearts of Iron IV: La Resistance
However my original question was separate to all of that.
What I was asking was- what can dx11 and 12 do that vulkan cannot?
Why Stellaris uses DX instead of Vulkan is not a question of features or performance, but rather the fact that by the time Vulkan was first released, Stellaris had already been a few years in development and was released like 3 months later. Switching to a different rendering API after the game is completed would be huge resource waste without much benefit.
 
  • 2
Reactions:

ProtoformX

Second Lieutenant
16 Badges
Jun 27, 2017
154
7
  • Europa Universalis IV: El Dorado
  • Magicka 2
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Dharma
  • Europa Universalis IV: Golden Century
  • Imperator: Rome Sign Up
  • Stellaris: Lithoids
  • Hearts of Iron IV: La Resistance
  • Crusader Kings II: The Old Gods
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Mare Nostrum
Isn't that interesting, other people don't get asked for sources, but I do.


What about across differing manufacturers of graphics cards? (NVIDIA, ATI, etc)
Good question. If we look at data like that; Should we also look at data for dx12 to see how they compare?


Aside from running natively on non-Windows environments, What can vulkan do that dx11 and 12 cannot?
I have no idea what vulkan can and cannot do, nor do I know what dx 11, 10, 12, and 9 can and cannot do.

Now, lets look at my original question.

...Has anyone asked why pdx is using dx rendering instead of vulkan?
My immediate response was

Because the game is bound by the simulation thread, not the graphics thread. Switching to vulkan is meaningless.
Now, looking at that answer, in direct relevance to that question.
Is it unfair to conclude KaiserTom was implying a difference of features? That dx11 offered something that vulkan did not?

Also that "Switching to vulkan is meaningless" suggesting again that vulkan is inferior, or at most equal.
Noone is challenging these assertions about dx 11, simulation threads, and whether switching to vulkan is meaningless.
Yet when I ask for further information about what each thing means, I get challenged and disagreements.


As far as sources go, I don't have an all encompassing broad spectrum quality list. But I do have things that are easy to find.

 
Last edited:
  • 3
Reactions:

ProtoformX

Second Lieutenant
16 Badges
Jun 27, 2017
154
7
  • Europa Universalis IV: El Dorado
  • Magicka 2
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Dharma
  • Europa Universalis IV: Golden Century
  • Imperator: Rome Sign Up
  • Stellaris: Lithoids
  • Hearts of Iron IV: La Resistance
  • Crusader Kings II: The Old Gods
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Mare Nostrum
Why Stellaris uses DX instead of Vulkan is not a question of features or performance, but rather the fact that by the time Vulkan was first released, Stellaris had already been a few years in development and was released like 3 months later. Switching to a different rendering API after the game is completed would be huge resource waste without much benefit.
While it's good to see people contributing constructively, my previous post acknowledged the cost of adoption.

I wasn't trying to trivialise that cost, nor was I ignorant of when vulkan was released- implied by my comments that vulkan is supposed to be more accessible than opengl.
Hinting that I knew opengl was technically better, but it was apparently very clunky and difficult to use. Compared to microsoft directx which might be technically inferior, but it's the mainstream thing, on the mainstream OS everybody knows, with plenty of thorough documentation and after-sales support.

I don't know enough about opengl vs vulkan codebase to know how they differ. Whether transitioning opengl to vulkan is an upgrade path similar to upgrading dx9 to 11.
However here, you've merely moved the goal-post of my original question.
Stellaris had already been a few years in development and was released like 3 months later.
If pdx have multi-platform games. Why do they use a microsoft exclusive API?


It's also bewildering to see people disagreeing with me, when most of the objections so far have been over things I've already acknowledged, or about things
that I haven't said.
 
  • 3
Reactions:

KaiserTom

Private
45 Badges
Feb 12, 2012
10
16
  • Victoria 2: A House Divided
  • Crusader Kings II
  • Victoria 2: Heart of Darkness
  • Stellaris: Digital Anniversary Edition
  • The Showdown Effect
  • Warlock: Master of the Arcane
  • War of the Roses
  • Cities: Skylines
  • Cities: Skylines - After Dark
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Supreme Ruler 2020
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Surviving Mars
  • Surviving Mars: Digital Deluxe Edition
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
  • Surviving Mars: First Colony Edition
  • Prison Architect
  • Surviving Mars: First Colony Edition
  • Europa Universalis III: Chronicles
  • Arsenal of Democracy
  • Cities in Motion 2
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sunset Invasion
  • Stellaris: Synthetic Dawn
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • Dungeonland
  • Europa Universalis III
  • Divine Wind
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Heir to the Throne
  • Leviathan: Warships
  • Magicka
  • Victoria: Revolutions
  • Sword of the Stars
  • Victoria 2
  • Sword of the Stars II
@ProtoformX Dude, you need to stop trying to push a graphics API that the game does not need. It will not accomplish much of anything and instead bring about many costs. Yes, the graphics threads may run a bit faster, but that means nothing when the entire game is bound by the game logic thread that Vulkan will not fix.

Is it unfair to conclude KaiserTom was implying a difference of features? That dx11 offered something that vulkan did not?

Also that "Switching to vulkan is meaningless" suggesting again that vulkan is inferior, or at most equal.
It does not matter whether Vulkan is better, equal, or inferior, because even if it is better, it will not make any performance difference in the game because the game speed is heavily bound by things unrelated to the graphics API; the game logic. Switching to Vulkan will not make the game logic run faster. It may make the individual graphics threads run faster, but that means nothing. Those threads are all ran on seperate cores from the game logic thread. The game is not bound by the graphics, at all. Stellaris is not a graphically intensive game unless you mod it to be. And even then you are still far more bound by the game logic. It does not matter if the rabbit gets across the finish line faster if you still need to wait for the tortoise to finish before continuing on.

When you posture that Vulkan should be used, it's up to you to demonstrate how that will make a meaningful difference in the game, considering developing it is not free. We are asserting that it is not meaningful to add at all. The game will not run any faster by switching to Vulkan. Hell, it won't run any faster switching to DX11 to be frank. But honestly, that was a free upgrade because they already needed a DX11 renderer for consoles. Migrating that over is quite easy since 99% of the work is done already.
 
  • 6
Reactions:

SephirothWS

Sergeant
18 Badges
Jan 3, 2019
54
77
  • Stellaris: Galaxy Edition
  • Age of Wonders III
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Prison Architect
  • Stellaris: Megacorp
  • Shadowrun Returns
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Teleglitch: Die More Edition
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Galaxy Edition
  • Stellaris
  • Magicka: Wizard Wars Founder Wizard
  • Stellaris: Synthetic Dawn
@SephirothWS ??
I'm failing to see a question here. You still also haven't given me any source information that I requested. A link to a Google Search isn't enough. Yeah, I could perform the search myself. But when you state information and make it sound like fact,
Vulkan benchmarks have better results when compared to dx12.
then I want to know where you pull your information from.

I am going to have to agree with @KaiserTom here though, you should not be pushing a graphics API the game doesn't necessarily need unless you plan on going to work for Paradox to implement the change as doing so is quite the expensive expenditure for little to no benefit as the game itself is bound by game logic, and not the graphics API.
 
Last edited: