Stellaris Dev Diary #170 - Performance and other technical issues
Stellaris, like most decently sized code bases, is like a complex game of Mikado or Jenga: every part is connected in some way to every other part. When you add a feature, you add more connections. If youre careful, you add only a few, if youre in a rush you add a bit too many. This generally leads to Unplanned Features (aka bugs). In addition, once we see them perform in the actual game, we tend to expand features in new, unexpected ways, leading to more Unplanned Features(tm). Once we realize what is happening, we start being more careful. Maybe too careful. Checking too many things, too often, ensuring that this interaction that is supposed to never actually happen is actually not happening. Not now, not later. Not ever. So you have removed the unplanned features, but the game is a bit, ah too careful. Some would say slow. So you remove some of these checks. You realize that you dont need to loop around the galaxy, you can just loop around this one tiny planet. Then you go one step further, and think well I can maybe do that check only every three weeks, and this calculation needed by all these checks, I could store it in here and reuse it until the next time it changes. So now the game isnt so careful anymore, were back in unplanned feature territory. But if the caching (storing/reusing calculations) happens at different times on different machines, you get slightly different results (like asking a developer for something before and after they had coffee). Slightly different results are what OOS thrives on! Clients and servers have 0.0001 cost difference, compounded over time, that corvette is bought on the server but not on the client. So you remove your smart algorithm. You replace it with the correct algorithm. You lose half of what you gained in step 2 and reintroduce some bugs. Probably. Rinse and repeat. But enough about my morning routine! Lets talk about
Stellaris fans are like C++ programmers: performance is always on their mind. To be fair, it has also been on ours a lot lately. We know that its not all that it could be, especially in late game and with the bigger galaxies. With that in mind, weve taken time to improve performance in a bit more depth than we usually can. We looked at what was taking the most time, and as everyone knows that is
There are many reasons why pops consume a lot of time in Stellaris, but the main one is that by endgame we have SO MANY of them. SO So so so so many. And they do so much! Pops have to calculate how good theyd be at every job (they do so every 7 days). Then they have to fight every other pop on the planet to get the job theyre best at. They also have to check if they could have a specific ethic. If they could join a specific faction. How happy they are. How happy they could be. How happy they would be on that planet over there. All these things trigger modifiers calculations. If you remember my last dev diary, you know that modifiers are the only thing more numerous than Pops in Stellaris. And they all depend on each other. Calculating them is like pulling on a thread and getting the whole sweater.
Well first, Ill admit I may have been a bit pigheaded on the whole we need to do the jobs distribution every day because we dont know when new jobs are added. We reexamined this assumption, and jobs distribution is now only done on demand. It was also rewritten to iterate over a lot fewer things. We also noticed a few triggers going through every pop of an empire to check if one or more are enslaved, decadent, or other things that can be tested at the species level. So we made new triggers to test these things at the species levels. In the same spirit, we had events going through every ship to find a fleet, so we added triggers at the fleet level. Second, Weve also reworked the approach to checking if pops can change ethics (and also made it work again), or if they can join factions. Finally, weve looked for (and found) opportunities to use more multi threading. But enough talk! Whats the result? Well, if a picture is worth a thousand words, heres the answer at 30000 words a second: https://www.youtube.com/watch?v=9SFE89Wj8go&feature=emb_title The video compares the performance of 2.5.1 Shelley to 2.6 Verne'' when running a save game from the community, which can be found attached to this post, with over 20000 pops. It was recorded on my work computer (Intel Core7-7900X @ 3.30Ghz, 10 cores and 20 threads, and AMD R9 Fury). You wont necessarily get the same results, the exact difference in performance will vary with your computer, and the exact situation in your own save games, of course. On average, weve found something between 15% and 30% improvement in late game situations. This save is just ideal to showcase the impact of the pops improvement. You wanna find out more about the performance improvements? Have a read here !
[ 2020-02-20 12:16:10 CET ] [ Original post ]
Hello, my friends! This is Moah, Tech Lead of Stellaris typing. I can finally talk about what youve all been waiting for: How many new platypi will there be in Federations? After weeks of Well, apparently, I should be "more technical." But before we jump into the mysteries of the Stellaris code, I want to take the time to talk a little about the balance between adding new features, improving performance and stability especially in terms of multiplayer and the dreaded out-of-syncs (dreaded at least by me).
The Delicate Balance
Stellaris, like most decently sized code bases, is like a complex game of Mikado or Jenga: every part is connected in some way to every other part. When you add a feature, you add more connections. If youre careful, you add only a few, if youre in a rush you add a bit too many. This generally leads to Unplanned Features (aka bugs). In addition, once we see them perform in the actual game, we tend to expand features in new, unexpected ways, leading to more Unplanned Features(tm). Once we realize what is happening, we start being more careful. Maybe too careful. Checking too many things, too often, ensuring that this interaction that is supposed to never actually happen is actually not happening. Not now, not later. Not ever. So you have removed the unplanned features, but the game is a bit, ah too careful. Some would say slow. So you remove some of these checks. You realize that you dont need to loop around the galaxy, you can just loop around this one tiny planet. Then you go one step further, and think well I can maybe do that check only every three weeks, and this calculation needed by all these checks, I could store it in here and reuse it until the next time it changes. So now the game isnt so careful anymore, were back in unplanned feature territory. But if the caching (storing/reusing calculations) happens at different times on different machines, you get slightly different results (like asking a developer for something before and after they had coffee). Slightly different results are what OOS thrives on! Clients and servers have 0.0001 cost difference, compounded over time, that corvette is bought on the server but not on the client. So you remove your smart algorithm. You replace it with the correct algorithm. You lose half of what you gained in step 2 and reintroduce some bugs. Probably. Rinse and repeat. But enough about my morning routine! Lets talk about
Performance
Stellaris fans are like C++ programmers: performance is always on their mind. To be fair, it has also been on ours a lot lately. We know that its not all that it could be, especially in late game and with the bigger galaxies. With that in mind, weve taken time to improve performance in a bit more depth than we usually can. We looked at what was taking the most time, and as everyone knows that is
Pops.
There are many reasons why pops consume a lot of time in Stellaris, but the main one is that by endgame we have SO MANY of them. SO So so so so many. And they do so much! Pops have to calculate how good theyd be at every job (they do so every 7 days). Then they have to fight every other pop on the planet to get the job theyre best at. They also have to check if they could have a specific ethic. If they could join a specific faction. How happy they are. How happy they could be. How happy they would be on that planet over there. All these things trigger modifiers calculations. If you remember my last dev diary, you know that modifiers are the only thing more numerous than Pops in Stellaris. And they all depend on each other. Calculating them is like pulling on a thread and getting the whole sweater.
OK, but what did we actually do about it?
Well first, Ill admit I may have been a bit pigheaded on the whole we need to do the jobs distribution every day because we dont know when new jobs are added. We reexamined this assumption, and jobs distribution is now only done on demand. It was also rewritten to iterate over a lot fewer things. We also noticed a few triggers going through every pop of an empire to check if one or more are enslaved, decadent, or other things that can be tested at the species level. So we made new triggers to test these things at the species levels. In the same spirit, we had events going through every ship to find a fleet, so we added triggers at the fleet level. Second, Weve also reworked the approach to checking if pops can change ethics (and also made it work again), or if they can join factions. Finally, weve looked for (and found) opportunities to use more multi threading. But enough talk! Whats the result? Well, if a picture is worth a thousand words, heres the answer at 30000 words a second: https://www.youtube.com/watch?v=9SFE89Wj8go&feature=emb_title The video compares the performance of 2.5.1 Shelley to 2.6 Verne'' when running a save game from the community, which can be found attached to this post, with over 20000 pops. It was recorded on my work computer (Intel Core7-7900X @ 3.30Ghz, 10 cores and 20 threads, and AMD R9 Fury). You wont necessarily get the same results, the exact difference in performance will vary with your computer, and the exact situation in your own save games, of course. On average, weve found something between 15% and 30% improvement in late game situations. This save is just ideal to showcase the impact of the pops improvement. You wanna find out more about the performance improvements? Have a read here !
Stellaris
Paradox Development Studio
Paradox Interactive
2016-05-09
Strategy Simulation Singleplayer Multiplayer
GameBillet
8.91 /
€
Game News Posts 537
🎹🖱️Keyboard + Mouse
Very Positive
(119848 reviews)
https://www.stellaris.com/
https://store.steampowered.com/app/281990 
The Game includes VR Support
Linux [153.28 M]
Stellaris: Infinite Frontiers eBook
Stellaris: Plantoids Species Pack
Stellaris: Leviathans Story Pack
Stellaris: Utopia
Stellaris: Nova Edition Upgrade Pack
Stellaris: Galaxy Edition Upgrade Pack
Stellaris: Anniversary Portraits
Stellaris: Synthetic Dawn
Stellaris: Apocalypse
Stellaris: Humanoids Species Pack
Stellaris: Distant Stars Story Pack
Stellaris: MegaCorp
Stellaris: Ancient Relics Story Pack
Stellaris: Lithoids Species Pack
Stellaris: Federations
Stellaris: Necroids Species Pack
Stellaris: Nemesis
Stellaris: Aquatics Species Pack
Stellaris: Overlord
Stellaris: Toxoids Species Pack
Stellaris: First Contact Story Pack
Stellaris: Galactic Paragons
Stellaris: Astral Planes
Stellaris: Expansion Subscription
Stellaris: The Machine Age
Stellaris: Cosmic Storms
Stellaris: Grand Archive
Stellaris: Rick the Cube Species Portrait
Stellaris: Season 08 - Expansion Pass
Explore a vast galaxy full of wonder! Paradox Development Studio, makers of the Crusader Kings and Europa Universalis series presents Stellaris, an evolution of the grand strategy genre with space exploration at its core.
Featuring deep strategic gameplay, a rich and enormously diverse selection of alien races and emergent storytelling, Stellaris has engaging challenging gameplay that rewards interstellar exploration as you traverse, discover, interact and learn more about the multitude of species you will encounter during your travels.
Etch your name across the cosmos by forging a galactic empire; colonizing remote planets and integrating alien civilizations. Will you expand through war alone or walk the path of diplomacy to achieve your goals?
Main Feature
Featuring deep strategic gameplay, a rich and enormously diverse selection of alien races and emergent storytelling, Stellaris has engaging challenging gameplay that rewards interstellar exploration as you traverse, discover, interact and learn more about the multitude of species you will encounter during your travels.
Etch your name across the cosmos by forging a galactic empire; colonizing remote planets and integrating alien civilizations. Will you expand through war alone or walk the path of diplomacy to achieve your goals?
Main Feature
- Deep & Varied Exploration.
- Enormous procedural galaxies, containing thousands of planets.
- Explore Anomalies with your heroic Scientist leaders.
- Infinitely varied races through customization and procedural generation.
- Advanced Diplomacy system worthy of a Grand Strategy Game.
- Ship Designer based on a vast array of technologies.
- Stunning space visuals.
MINIMAL SETUP
- OS: Ubuntu 20.04 x64
- Processor: Intel iCore i3-530 or AMD FX-6350Memory: 4 GB RAM
- Memory: 4 GB RAM
- Graphics: Nvidia GeForce GTX 460 or AMD ATI Radeon HD 5870 (1GB VRAM). or AMD Radeon RX Vega 11 or Intel HD Graphics 4600Network: Broadband Internet connection
- Storage: 12 GB available space
- OS: Ubuntu 20.04 x64
- Processor: Intel iCore i5-3570K or AMD Ryzen 5 2400GMemory: 4 GB RAM
- Memory: 4 GB RAM
- Graphics: Nvidia GeForce GTX 560 Ti (1GB VRAM) or AMD Radeon R7 370 (2 GB VRAM)Network: Broadband Internet connection
- Storage: 12 GB available space
GAMEBILLET
[ 5951 ]
GAMERSGATE
[ 3154 ]
FANATICAL BUNDLES
HUMBLE BUNDLES
by buying games/dlcs from affiliate links you are supporting tuxDB