Putting the 'role' back in role-playing games since 2002.
Donate to Codex
Good Old Games
  • Welcome to rpgcodex.net, a site dedicated to discussing computer based role-playing games in a free and open fashion. We're less strict than other forums, but please refer to the rules.

    "This message is awaiting moderator approval": All new users must pass through our moderation queue before they will be able to post normally. Until your account has "passed" your posts will only be visible to yourself (and moderators) until they are approved. Give us a week to get around to approving / deleting / ignoring your mundane opinion on crap before hassling us about it. Once you have passed the moderation period (think of it as a test), you will be able to post normally, just like all the other retards.

Stellaris - Paradox new sci-fi grand strategy game

Joined
Jan 7, 2012
Messages
14,374
As the saying goes, what paradox programmers giveth, paradox content creators taketh away
 

Storyfag

Perfidious Pole
Patron
Joined
Feb 17, 2011
Messages
16,184
Location
Stealth Orbital Nuke Control Centre
Performance
  • Parallelised batch modifier updates (large reduction of lag spike potential in the late game).
  • Fixed a problem with multithreading that meant that sometimes all threads would just wait a while for each other for up to 20 milliseconds.
  • Cached colonies in system so that the game can iterate through colonized planets instead of going through all the planets in the system and working out if they were colonized.
  • Cached updating of starbase type, which was previously calculated on the fly when needed - slowing down e.g. outliner updates.
  • Cached wars list instead of recalculating it repeatedly whenever a country had to see if it was in a certain (or any) war.
  • Fixed a lag spike that could happen when the AI considered where to build megastructures.
  • Improved performance of checking whether a country can use a certain hyper relay or gateway.
  • Improved performance of the game checking if a planet is a colony, slightly (it does this a lot, so this speeds up e.g. intel updating non-negligibly).
  • Multithreaded working out trade value and resources for systems' map icon displays on the galaxy map.
  • Now AI finds the best potential office branch 4x faster. Reduced number of the systems used to calculate the distance to the target planet by using only border systems of the current empire.
  • Optimized a few events frequently called via on_planet_surveyed (since planets can be surveyed and unsurveyed via the intel system).
  • Parallelised calculations for how much a Situations should progress on the monthly tick (i.e. reduced Situations' potential impact on monthly ticks).
  • Parallelised strike craft movement.
  • Reduced the performance cost of auto migration on the monthly tick (by about half).
  • Shifted country migration caching from serial to parallel.
  • Shifted most of spynetworks' daily updates from serial to threaded.
  • Shifted ship jump drive and experience calculations to parallel.
  • Shifted some parts of planets' handling of monthly pop growth to parallel to speed up the monthly tick a little bit.
  • Sped up monthly tick a bit by multithreading country opinion caching that is done then.
  • Threaded daily checks of policies' validity.
Yeah baby, talk Performance to me.

Performance

Now, I shall turn to performance: myself and a few others weren’t really happy with the late game performance in Stellaris. So we tried, with various methods, to make it better. And, to be honest, the results are quite promising.

In general, there are three ways of making performance better: fix cumbersome logic, use caching, and multithread. It’s not so easy, though, because the latter two solutions have some unpleasant friends: caches like to hang out with Out Of Syncs and miscalculations, while multithreading likes both CTDs and OOSes. But we managed to make headway on various issues.

First and foremost, modifier updates were quite expensive. For instance, if you enabled an edict in your country, it would trigger a recalculation of the modifiers in every planet, fleet, ship and pop owned by this country. This ends up being a lot of recalculations, which could take a while, since updating modifiers was not exactly trivial - basically, the nice tooltips in pop details which show where all the effects they have come from take a fair bit of processing power to achieve.

There are two improvements on this front in 3.5. Firstly, we multithreaded the modifier updates. It was all done in serial before, and could lead to lengthy freezes and some daily ticks taking far longer than others. For good reason - there were a lot of interdependencies to untangle, and crashes to prevent. Still, this had a pretty big effect.

Additionally, I noticed that pops were getting modifiers added to them that were irrelevant, like megastructure cost modifiers. So an additional parameter was added to economic categories to specify where the modifiers in them were expected to go, which ended up saving a further 20% of time while recalculating modifiers.

Aside from this, a fairly big improvement came when we noticed that our multithreading system would occasionally bug out and have all threads waiting for each other for several milliseconds. This made multithreading relatively fast operations actually end up being slower on average, and even where it was still worth it, it’d be slower than it needed to be. Luckily, our Tech Director was able to save the day and stop this madness, improving our player experience immeasurably.

This is just a taste of the things we did. Basically, a lot of time was spent analysing a deliberately absurd save game - it was set to maximum pop growth, tech progress, galaxy size and habitable planets, and then run without crises or fallen empires until 2730. The game chugged a fair bit (with which I mean, it took 11 minutes for a year), but it turned out the main culprit was strike craft movement. I was unable to replicate this on any normal save - it probably only occurs during battle, and there were presumably some extremely large battles going on - but anyway by multithreading that it actually became somewhat more reasonable to play.

From there, there were a lot of incremental fixes that were possible. For instance, the game spent quite a bit of time working out whether a system had colonies in it, several times a day - something which could be cached quite easily. (Well, so I thought. Two OOS fixes later, I was regretting this). Another big offender was wars: a country didn’t have a cached set of wars it was fighting in, but would instead recalculate all the wars it was fighting in whenever it needed to know information about any of the wars it was fighting in. Needless to say, this was quite inefficient, and fortunately quite cachable. Then, whenever the game was working out which type of starbase a starbase was (e.g. “Bastion”) - including every few frames on the outliner - it would look through every different type of starbase and decide which one was most appropriate here - the answer? Cache, cache, cache.

We also sped up the time it took for the AI to decide where to establish branch offices. Then we noticed that most of the time spent updating countries in serial was spent assessing the validity of their policies - something which we could thread. (Ok, it’s not so easy: we could thread the calculation, cache the result, and then implement the result in the next serial update, which would be basically straight afterwards). Finally, monthly ticks should be a bit quicker, since we used a similar logic on the calculations for which pops should assemble, grow and decline, and also removed about 50% of the job cache recalculations during auto migrations.

It wasn’t all plain sailing - aside from at least three OOSes and two crashes introduced and fixed with this work, we noticed after a while that the game wasn’t quite as fast as we were expecting. In fact, it was temporarily freezing every few days. This, it turned out, was because - thanks to some logic fixes with unintended consequences - the AI was thinking extremely hard about where to place its megastructures. So some changes to put the more expensive checks there were needed.

How much impact will all this have? Well, I can’t promise any particular number, for various reasons. For one thing, most of these improvements were made in July, and it’s always possible we added new inefficiencies in the meantime (e.g. the megastructures thing). Also, in particular due to AI games, a 3.4 save is not very comparable with a 3.5 save, since the AI will have behaved rather differently in creating that save (but on the other hand, you cannot load a 3.5 save in 3.4, because it will almost certainly crash). Besides that, a particular save may have a particular thing going on causing it to lag (e.g. the strike craft issue alluded to before, which had otherwise seemed a non-issue). And sometimes computers are just temperamental and allocate their resources to doing things other than playing the game. Nevertheless, last time I did tests based on 3.4 saves, it was more than 30% faster. In my latest late game campaign, it’s not precisely fast (the late game will never be as fast as the early game - there’s so little going on in the early game that performance is primarily determined by how fast it takes to render frames), but it definitely feels less slow. But I look forward to seeing what people think, and whether people feel that more effort is needed.
Holy shit, look at what a performance mess their code was (likely still is).

But this is good progress.

Now THIS is what I'm talking about when it comes to performance fixes.

Custodians fucking deliver. All other pdox team should learn from this.
And I was just beggining to itch for a replay...
 
Joined
May 11, 2007
Messages
1,853,727
Location
Belém do Pará, Império do Brasil
Fucking finally. Late game performance keeps me from playing the game entirely.
Right? I got a game to like 200 years, but the performance gave me soulpain.

As the saying goes, what paradox programmers giveth, paradox content creators taketh away
Yeah, but that's the thing with programming: You have to be careful or your project gets technical debt. Legacy Code is a bitch.

And I was just beggining to itch for a replay...
Sigh Right?
Its "wait for the next update so you can do a replay" o'clock.
 

Zarniwoop

TESTOSTERONIC As Fuck™
Patron
Joined
Nov 29, 2010
Messages
18,785
Shadorwun: Hong Kong
What are you talking about, I love it when each day takes 2 seconds to pass and FASTEST is exactly as fast as NORMAL :lol:

The Star Trek mod is hurting my BRIAN. It's possibly the best Star Trek game ever (who would have guessed, fans make better shit than megacorps staffed with Harry Potter-watching millennials), but by the time you even get to Kirk's era it's crawling. By the time you get Galaxy Class ships, it's basically unplayable. And that's on the normal galaxy, not the MEGA HUEG one with 4000 stars.
 

Dakka

Savant
Joined
Oct 3, 2017
Messages
216
Location
Hell
What are you talking about, I love it when each day takes 2 seconds to pass and FASTEST is exactly as fast as NORMAL :lol:

The Star Trek mod is hurting my BRIAN. It's possibly the best Star Trek game ever (who would have guessed, fans make better shit than megacorps staffed with Harry Potter-watching millennials), but by the time you even get to Kirk's era it's crawling. By the time you get Galaxy Class ships, it's basically unplayable. And that's on the normal galaxy, not the MEGA HUEG one with 4000 stars.
Good points overall, but please let Brian go. The poor dude needs fresh air.
 

Zarniwoop

TESTOSTERONIC As Fuck™
Patron
Joined
Nov 29, 2010
Messages
18,785
Shadorwun: Hong Kong
Anyway the consensus seems to be that the lags in the late game come from calculating what each pop is doing. The more pops, the slower your game gets. I don't see anything here addressing that?
 

DesolationStone

Educated
Joined
Jan 25, 2021
Messages
144
Location
Italy
Finally, after six years, ten thousand revampation of the base mechanics and 200$ of dlcs. And this is just Stellaris 1, right now I'm scared for Stellaris 2
 

Dakka

Savant
Joined
Oct 3, 2017
Messages
216
Location
Hell
Finally, after six years, ten thousand revampation of the base mechanics and 200$ of dlcs. And this is just Stellaris 1, right now I'm scared for Stellaris 2
Stellaris is still being handled much better than most other Paradox games, if not all of them. I get the impression some Paradox executives actually play Stellaris and want it to be good. So who knows, maybe Stellaris 2 will be alright.
 

CthuluIsSpy

Arcane
Joined
Dec 26, 2014
Messages
8,149
Location
On the internet, writing shit posts.
Finally, after six years, ten thousand revampation of the base mechanics and 200$ of dlcs. And this is just Stellaris 1, right now I'm scared for Stellaris 2
Stellaris is still being handled much better than most other Paradox games, if not all of them. I get the impression some Paradox executives actually play Stellaris and want it to be good. So who knows, maybe Stellaris 2 will be alright.
Yeah, the price / dlc model for Stellaris isn't as egregious as CK2 and EU4.
You can play Stellaris without most of it's DLC (barring Utopia). For CK2 and EU4 the fuckers locked really useful mechanics and features behind a paywall.
Being able to upgrade your ships and convert your colonies should have been part of a free patch.
 

HeroMarine

Irenaeus
Vatnik
Joined
Feb 3, 2019
Messages
16,306
Location
Rio de Janeiro, 1936
Finally, after six years, ten thousand revampation of the base mechanics and 200$ of dlcs. And this is just Stellaris 1, right now I'm scared for Stellaris 2
Stellaris is still being handled much better than most other Paradox games, if not all of them. I get the impression some Paradox executives actually play Stellaris and want it to be good. So who knows, maybe Stellaris 2 will be alright.
Of all the paradox games to play... :negative:
 

Grotesque

±¼ ¯\_(ツ)_/¯
Patron
Vatnik
Joined
Apr 16, 2012
Messages
9,048
Divinity: Original Sin Divinity: Original Sin 2
I have the original game.

How much money do I need to spend more if I want to have all the addons?
 

Joggerino

Arcane
Patron
Vatnik
Joined
Oct 28, 2020
Messages
4,495
I have the original game.

How much money do I need to spend more if I want to have all the addons?
Why comrade? If you want to play MP only the host needs to have DLC, if you want to play SP its trivial getting the DLC activated...
 

The_Mask

Just like Yves, I chase tales.
Patron
Joined
May 3, 2018
Messages
5,902
Location
The land of ice and snow.
Strap Yourselves In Codex Year of the Donut Steve gets a Kidney but I don't even get a tag. Pathfinder: Wrath I helped put crap in Monomyth
I have the original game.

How much money do I need to spend more if I want to have all the addons?
You need to do your homework for each add-on. Some of them are purely cosmetic and bring absolutely nothing to the game. And you might need to do your homework on some of the gameplay ones as well. Some are just bad.
 
Joined
Mar 3, 2010
Messages
8,929
Location
Italy
at this point, honestly, as with eu4, i'd gladly rather pay 4 euros for a month of full dlc-ed stellaris. it's not like i'd want to play it for longer, in a row.
 

Preben

Arcane
Patron
Glory to Ukraine
Joined
Jan 18, 2017
Messages
3,821
Location
Failsaw, Failand
Finally, after six years, ten thousand revampation of the base mechanics and 200$ of dlcs. And this is just Stellaris 1, right now I'm scared for Stellaris 2
Stellaris is still being handled much better than most other Paradox games, if not all of them. I get the impression some Paradox executives actually play Stellaris and want it to be good. So who knows, maybe Stellaris 2 will be alright.

They handled the game over to a smaller team and Paradox bigwigs moved onto another projects. Surprising literally no one, the B-team turned out to be far more competent and managed to unfuck some of the most glaring bugs and glitches. Same went with CK2 and Imperator. Unfortunately, in case of Stellaris there are flaws in the very core design of the game which cannot be fixed without tearing the game open and rewriting most basic concepts.
 

Norfleet

Moderator
Joined
Jun 3, 2005
Messages
12,250
Not that this has stopped them before, the basic concepts of the game have been torn out and rewritten multiple times already. If it weren't for the fact that the graphics haven't changed, the game is functionally unrecognizable from its release version.
 

Non-Edgy Gamer

Grand Dragon
Patron
Glory to Ukraine
Joined
Nov 6, 2020
Messages
15,408
Strap Yourselves In
Not that this has stopped them before, the basic concepts of the game have been torn out and rewritten multiple times already. If it weren't for the fact that the graphics haven't changed, the game is functionally unrecognizable from its release version.
Yeah, but it's been rewritten for reddit, not hardcore sci fi simulationists.

There are a lot of QoL additions they made to the game that make it easier to play, and a lot of bugs they've fixed, but it's a far less ambitious, less interesting game at its core now that it was at release. Rather than getting rid of the unbalanced propulsion mechanics, they should have doubled down on them and made even more asymmetrical mechanics.

I want a game that's going to keep me guessing about whatever it is I'm going to run into next, not give me the same races with a different skin a dozen times.
 

Preben

Arcane
Patron
Glory to Ukraine
Joined
Jan 18, 2017
Messages
3,821
Location
Failsaw, Failand
Not that this has stopped them before, the basic concepts of the game have been torn out and rewritten multiple times already. If it weren't for the fact that the graphics haven't changed, the game is functionally unrecognizable from its release version.

Yes and no. They tinkered around for example pop and planet management, but these things were already in the game. At the same time the game does not even try to simulate any internal affairs of each empire.
 

Fedora Master

Arcane
Patron
Edgy
Joined
Jun 28, 2017
Messages
28,480
LoL I can already see it:
They fix performance only to tank it again with retarded spaghetti code just to simulate some angry pops
 
Joined
Jan 7, 2012
Messages
14,374
There are a lot of QoL additions they made to the game that make it easier to play, and a lot of bugs they've fixed, but it's a far less ambitious, less interesting game at its core now that it was at release. Rather than getting rid of the unbalanced propulsion mechanics, they should have doubled down on them and made even more asymmetrical mechanics.
Yeah, it's sad that there is next to nothing to distinguish empires now besides +/-% bonuses (which quickly get weaker over time as tech gives bonuses to everything, so it's just a race to get tech).

You would have thought that "toxoids" would be an expansion introducing a race that could inhabit some of those "toxic" worlds that other races literally can't colonize. Maybe even a race that could only inhabit toxic worlds. No, they are just a regular race with funny pictures and some slightly different traits.
 

Non-Edgy Gamer

Grand Dragon
Patron
Glory to Ukraine
Joined
Nov 6, 2020
Messages
15,408
Strap Yourselves In
There are a lot of QoL additions they made to the game that make it easier to play, and a lot of bugs they've fixed, but it's a far less ambitious, less interesting game at its core now that it was at release. Rather than getting rid of the unbalanced propulsion mechanics, they should have doubled down on them and made even more asymmetrical mechanics.
Yeah, it's sad that there is next to nothing to distinguish empires now besides +/-% bonuses (which quickly get weaker over time as tech gives bonuses to everything, so it's just a race to get tech).

You would have thought that "toxoids" would be an expansion introducing a race that could inhabit some of those "toxic" worlds that other races literally can't colonize. Maybe even a race that could only inhabit toxic worlds. No, they are just a regular race with funny pictures and some slightly different traits.
The problem is "balance". Toxoids would inevitably become unbalanced if there are more toxic worlds than habitable.

I hate balance in games. Especially in games that are mostly played singleplayer.
 
Joined
May 11, 2007
Messages
1,853,727
Location
Belém do Pará, Império do Brasil
There are A LOT of Toxic Worlds tho.

"Toxic World" is a really shitty world category which needs to be split, honestly.
For the record, Stellaris classifies Venus as a toxic world. I mean, it's certainly toxic, but what makes Venus distinguishable is the fact its a world with a runaway greenhouse effect which turned it into a planet-sized hell-oven, not the fact the atmosphere is no-no for us to breathe - that's like, the least scary thing about Venus.

Hell, with some of that tech you see in Stellaris, you could easily colonize a planet like Venus. There is talk of colonizing Venus with floating cloud colonies.
 

As an Amazon Associate, rpgcodex.net earns from qualifying purchases.
Back
Top Bottom