Game optimization and playability

Post all other topics which do not belong to any other category.
gujarat6
Burner Inserter
Burner Inserter
Posts: 14
Joined: Wed Apr 08, 2020 4:53 pm
Contact:

Game optimization and playability

Post by gujarat6 »

Hello everyone!
I'm on the Factorio train since 2016 and I'm well over 2000 hours into the game. I had a lot of fun playing, modding, single, multi, basically, I know the game and I like it very much. But there is one problem, which bothers me, always did, and probably will in the future, I want to talk about end-game, late late game. I feel like this game has such a great potential to be the best game ever created, but the game engine is holding it back, every time you start a new game you already know you will not be able to play past some point. This makes me very sad, and sometimes I just don't even start. What is the point spending 300hrs on a save, when there is only one thing, which is 100% going to happen, and it's reaching the roof. Already when creating a new world I can tell you when it is going to end. I know that the game cannot be simply turned to multithreaded, but it would make me feel a lot better if I knew there was something going on behind the scenes to enhance the performance. I don't know guys how do you fell about this, and if you ever created a mega-base, but for me, it has become tiring, when you cannot just do what you want and instead you need to calculate the best UPS efficient methods in order to make your games last longer. It kills the creativity and in the end the fun. I really hope the only solution to this problem is not i9-999999999K at 50GHz. Let me know what do you think, cheers <3
Image
Last edited by gujarat6 on Sat Aug 22, 2020 8:01 pm, edited 2 times in total.
Serenity
Smart Inserter
Smart Inserter
Posts: 1016
Joined: Fri Apr 15, 2016 6:16 am
Contact:

Re: Game optimization and playability

Post by Serenity »

That's just how computers work. Of course there is a limit somewhere. Factorio is one of the most highly optimized games you will find.
_wf_
Burner Inserter
Burner Inserter
Posts: 14
Joined: Sun Jul 24, 2016 4:03 pm
Contact:

Re: Game optimization and playability

Post by _wf_ »

Please keep in mind that the game is intended to be won, and all achievements can be obtained, on a ~45 SPM base. The game's performance doesn't even budge until you are at 1000 SPM. That's more than a 20 times safety margin – which is frankly amazing.

Have you tried to build a large base in e.g. Subnautica? The game literally freezes for two seconds whenever you place a new building. And that's with maybe a hundred base modules, not ten thousand as is common with this game.

If you followed the dev blog, there have in fact been all the things going on in the background to improve the performance. Factorio 1.0 can support several times larger bases than e.g. 0.12. Several times in the history of development, the devs have taken a – what was then – huge factory, and made it run at full speed (just for the community to come around with a bigger factory two weeks later :-p).

The term "multithreading" tends to get tossed around, but is not your lord and savior. Several experiments are documented in FFF, what could be done without actually making performance worse has been done. In fact performance is already dominated by the speed your computer can transfer data to and from memory (those 100 MB of factory you built need to be touched every 16 ms!)
Loewchen
Global Moderator
Global Moderator
Posts: 9089
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: Game optimization and playability

Post by Loewchen »

You could say the exact same thing about a factorio that runs 1000x faster, there is no factor of performance improvement that would allow unlimited building.
Yoyobuae
Filter Inserter
Filter Inserter
Posts: 509
Joined: Fri Nov 04, 2016 11:04 pm
Contact:

Re: Game optimization and playability

Post by Yoyobuae »

_wf_ wrote: Sat Aug 22, 2020 8:38 pmThe term "multithreading" tends to get tossed around, but is not your lord and savior. Several experiments are documented in FFF, what could be done without actually making performance worse has been done. In fact performance is already dominated by the speed your computer can transfer data to and from memory (those 100 MB of factory you built need to be touched every 16 ms!)
I've tried a naive "multithreading" test using Factorio benchmark mode.

I downloaded the save for benchmarking from this post: viewtopic.php?p=505630#p505630

I ran a single Factorio instance with this result: 78.15 UPS average

Then I ran 12x Factorio instances simultaneosly (I got a 12 core CPU) with this result: 28.20 UPS average x 12 = 338.39 UPS total

For my system (Ryzen 3900x CPU, 3200 DDR4 32GB memory) there's a theoretical possible gain of 4.33x if Factorio were to run fully multithreaded.

Of course, that's a naive approximation. Multithreading itself adds it's own cost so the gains would certainly be less. Still, it seems that at least the memory bandwidth is there. If memory bandwidth was the bottleneck then the performance should've remained the same between the single and multi instance tests.
Koub
Global Moderator
Global Moderator
Posts: 7766
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Game optimization and playability

Post by Koub »

Take your rig's limits as part of the puzzle. Nothing can scale indefinitely on a finite hardware. If you're hardware limited, think of better solutions that can help you build more while needing less CPU.
Koub - Please consider English is not my native language.
Yoyobuae
Filter Inserter
Filter Inserter
Posts: 509
Joined: Fri Nov 04, 2016 11:04 pm
Contact:

Re: Game optimization and playability

Post by Yoyobuae »

Koub wrote: Sat Aug 22, 2020 9:46 pm Take your rig's limits as part of the puzzle. Nothing can scale indefinitely on a finite hardware. If you're hardware limited, think of better solutions that can help you build more while needing less CPU.
Use Clustorio to split the megabase across several computers. Figure out ways to make more money to keep buying more servers for more Factorio instances. The Factory must grow!
Matess
Manual Inserter
Manual Inserter
Posts: 3
Joined: Mon Nov 18, 2019 12:12 am
Contact:

Re: Game optimization and playability

Post by Matess »

I actually read all the opinions here and yes I get that the game is perfectly playable to the end but also it kills me when I start a big project and it stops to be playable at 6k spm with 8core cpu running at 22% total. I love this game so much that I would buy a threadripper pc if it that maked any sense. Clustorio and multiple instances is some how solution, but i would prefer if it was possible to split the parts of the map in just one game..
Qon
Smart Inserter
Smart Inserter
Posts: 2164
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: Game optimization and playability

Post by Qon »

gujarat6 wrote: Sat Aug 22, 2020 7:24 pm What is the point spending 300hrs on a save, when there is only one thing, which is 100% going to happen, and it's reaching the roof. Already when creating a new world I can tell you when it is going to end. I know that the game cannot be simply turned to multithreaded, but it would make me feel a lot better if I knew there was something going on behind the scenes to enhance the performance. I don't know guys how do you fell about this, and if you ever created a mega-base, but for me, it has become tiring, when you cannot just do what you want and instead you need to calculate the best UPS efficient methods in order to make your games last longer. It kills the creativity and in the end the fun.
Matess wrote: Sun Oct 25, 2020 10:24 am I actually read all the opinions here and yes I get that the game is perfectly playable to the end but also it kills me when I start a big project and it stops to be playable at 6k spm with 8core cpu running at 22% total. I love this game so much that I would buy a threadripper pc if it that maked any sense. Clustorio and multiple instances is some how solution, but i would prefer if it was possible to split the parts of the map in just one game..
Come join me in Optimization idea: abstraction where I argue for the case and discuss the maybe possibility of O(1) computation regardless of factory size. Pretty cool topic.
Koub wrote: Sat Aug 22, 2020 9:46 pmNothing can scale indefinitely on a finite hardware.
It "could", if you removed the need for computing things to run your factory.
Loewchen wrote: Sat Aug 22, 2020 9:01 pmYou could say the exact same thing about a factorio that runs 1000x faster, there is no factor of performance improvement that would allow unlimited building.
Yes a constant speedup factor is not enough. You need something that doesn't speed up computations but instead remove them to allow for "no limits expansion". But 1000x is pretty good regardless. You would never hit the factory production capacity limit then because you reach the UPS limit for building speed and possible time spent in a world.
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
blazespinnaker
Filter Inserter
Filter Inserter
Posts: 665
Joined: Wed Sep 16, 2020 12:45 pm
Contact:

Re: Game optimization and playability

Post by blazespinnaker »

This should address the issue somewhat - viewtopic.php?f=33&t=93946

I think something like this would be useful for those interested in building larger train networks.

It also has an intriguing and very useful side benefit of being able to make updates to core factory designs without having to redundantly replicate them everywhere.
OptimaUPS Mod, pm for info.
JimBarracus
Filter Inserter
Filter Inserter
Posts: 365
Joined: Mon Jul 03, 2017 9:14 am
Contact:

Re: Game optimization and playability

Post by JimBarracus »

Matess wrote: Sun Oct 25, 2020 10:24 am I actually read all the opinions here and yes I get that the game is perfectly playable to the end but also it kills me when I start a big project and it stops to be playable at 6k spm with 8core cpu running at 22% total. I love this game so much that I would buy a threadripper pc if it that maked any sense. Clustorio and multiple instances is some how solution, but i would prefer if it was possible to split the parts of the map in just one game..
RAM is often the limiting factor.
User avatar
MEOWMI
Filter Inserter
Filter Inserter
Posts: 334
Joined: Wed May 22, 2019 12:21 pm
Contact:

Re: Game optimization and playability

Post by MEOWMI »

There is, in fact, an extreme amount "going on behind the scenes to enhance the performance". If it wasn't there, you could probably not even reach 1k spm.

Aside from further advanced optimizations, there is one method that has interested me: creating extremely costly but very UPS efficient alternatives. I'm talking things like 10x (or 100x) speed devices, robots with a lot more carrying capacity, structures that combine production steps into one entity, and so forth... I think it could be a really good mod concept, although challenging from a game design stand point in order to make it interesting and to make it feel like it fits in. There probably exist mods that try to address it in various ways, but to do it well is a difficult task, yet despite that it would still be worthwhile for those gigabase builds.

Actually, pretty much another take on this: viewtopic.php?f=6&t=82060
blazespinnaker
Filter Inserter
Filter Inserter
Posts: 665
Joined: Wed Sep 16, 2020 12:45 pm
Contact:

Re: Game optimization and playability

Post by blazespinnaker »

The problem with those approaches is they reduce the complexity and challenge of factorio itself. Creating production in the face of that complexity is what makes it so engaging. Creating entities which reduce that challenge just reduces the fun of the game.

Even the abstraction concept isn't perfect for that particular reason, though I would say that managing clones of core factory designs isn't necessarily the most enjoyable part of the game so it's not that bad. And certainly, allowing for more complex train network designs seems like a pretty good trade off.

In some ways, also, the abstraction mod introduces a new puzzle: what is the ideal core factory design to clone? Too small, and you add some overhead to UPS between train stops and abstracted factories. Too large, and you deal with the UPS consumption of that larger factory.

Another factor in this, is that mods can bifurcate the community and reduce shared experiences that can be discussed in forum. Creating a mod that tries to track the shared experiences as much as possible has some definite benefits in that area. Not all mods should have that goal, of course.
OptimaUPS Mod, pm for info.
Hannu
Filter Inserter
Filter Inserter
Posts: 850
Joined: Thu Apr 28, 2016 6:27 am
Contact:

Re: Game optimization and playability

Post by Hannu »

Factorio is extremely well optimized. It can handle tens of thousands of active entities with . I think there is not much to do. There will be limit somewhere in any case and it is easy to break it with building bots. If you got 8 times more performance by threading it would increase time before you achieve the limit by just few hours. Also increasing of throughput of entities is not interesting. Then the factory is practically the same and only numbers grow exponentially. If someone likes growing numbers there is better games, like Swarmsim. My meat production is currently +2.01e6363/hr (10 to the power of 6363 is correct).

I prefer to use some personal restrictions and aesthetic objectives. And also modded games give much more entertainment.
starlinvf
Fast Inserter
Fast Inserter
Posts: 145
Joined: Sat Dec 14, 2019 6:28 pm
Contact:

Re: Game optimization and playability

Post by starlinvf »

I'd like to offer a more philosophical argument..... Why does do you need to keep building more?


This is something of big existential question when you're dealing with modern games, and modern gamer's seemingly insatiable need for validation through progression. But I've seen a disturbing number of cases were people say the words "End game", but go on to describe an endless cycle of paradoxical evolution. To assume the highest level of accomplishment is something one obtains, and then want more. When both a process and a goal become a circular "means to an end" to each other. Where the only possible win state would be to subvert all information in the universe into a single megalithic process; thus creating the very thing you've been fighting against since the beginning.... a ceiling to progression.


Its easy to think as if this is unattainable, and there fore not an issue. But consider the finite limits of everything that has to operate these processes are a lot smaller then they seem. Yet players will chug on, long after purpose, meaning, and even agency has atrophied. You only move on from it when there is nothing left. When all that can be converted into your fold has been done so. Not because you choose too..... but because the path has forced you to the side.


There was a series on Scifi back in the day called Lexx. Among its antagonists, is a creature called Mantrid. A human scholar whose demise lead to the creation of the ultimate form of order. A hybrid entity with his intellect, combined with the instinctual drive of a sentient insect, and formed the programming of a hive mind machine. A thing with both the desire to see humanity destroyed, and the means to accomplish it. The goal is simple. ANd for all he destroys, the matter is repurposed into drones that expand his machine self. No distractions or reluctance...... except one. Due to earlier story reasons, he holds particular interest in one of characters due to his insect aspect. His ultimate satisfaction, his "end game" if you will... is to see that one human destroyed. Yet he does not. Instead he destroys (literally) "everything else" around him. Worlds, Star systems, civilizations, the universe itself, bit by bit. But not to cause this character suffering; for that character is no longer able to feel such things.


"... I get satisfaction from the destruction of humans, and their habitat. But my satisfaction will not be complete, until I've destroyed you. Last of the Brunen-G.
When asked why he simply doesn't destroy them given they are powerless to stop Mantrid. Why destroy the rest of the universe? .... he answers with chilling candor.
"Because I'm enjoying the game. The game will end when you, the very last thing in this universe, succumb to me. You'll not have to wait long. Our game is almost at its end. Toodaloo"

In all this talk, you use the term "end game", yet despair its end. So tell me..... in what way would you see an end that is completely satisfying? Can you even see an end that is complete?
blazespinnaker
Filter Inserter
Filter Inserter
Posts: 665
Joined: Wed Sep 16, 2020 12:45 pm
Contact:

Re: Game optimization and playability

Post by blazespinnaker »

Yeah, great series.

I think another way of looking at it though, is factorio is like a set of crossword puzzles and extending UPS is just yet another puzzle in a long series of puzzles that can be solved through the game. Mods, in a way, are like factories, except instead of solving production / optimisation puzzles you are solving feature puzzles.
OptimaUPS Mod, pm for info.
mudcrabempire
Fast Inserter
Fast Inserter
Posts: 110
Joined: Sun Oct 28, 2018 2:44 pm
Contact:

Re: Game optimization and playability

Post by mudcrabempire »

I´ve seen a few answers saying basically "Improving performance won´t do since then people will just build bigger factories until they hit performance again".
I would like to argue that this is not true.

Building a factory takes time. Building a bigger factory takes more time. Humans have a limited lifetime. Therefore, if the machine and the game are sufficiently powerfull that during a human lifetime, one cannot build a factory big enough to hit the hardware limits, there is enough optimization.

Until people start working together or figure out immortality.

But according to the currently believed-to-be-true laws of thermodynamics, our time in this universe is limited too (look up "heat-death of the universe"), so if the machine and the game are sufficiently powerfull that all humans working together until the end of the universe cannot build a factory large enough to hit the hardware limits then i daresay "it was enough power".

PS: I really liked the suggestion about using clusterio to build factories across multiple computers. You may not consider this "pure" factorio, but it does basically change the UPS limit from "what one machine can handle" to "what many machines can handle". Well, you still need to pay for all those machines though which i assume is not exactly up your alley.

PPS: Could one use a clusterio-like setup to run multiple instances of factorio on a single computer all working together? If i understand correctly, this would effectively be a valid method of "multithreading" factorio, as each instance could run on its own thread. Of course, performance could only be improved that way if there are no other limitations in place (i think i saw a note on memory reading speed? That doesn´t look like something circumventable that way).
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

Re: Game optimization and playability

Post by Deadlock989 »

mudcrabempire wrote: Sat Jan 09, 2021 2:03 pm I´ve seen a few answers saying basically "Improving performance won´t do since then people will just build bigger factories until they hit performance again".
I would like to argue that this is not true.

Building a factory takes time. Building a bigger factory takes more time. Humans have a limited lifetime. Therefore, if the machine and the game are sufficiently powerfull that during a human lifetime, one cannot build a factory big enough to hit the hardware limits, there is enough optimization.

Until people start working together or figure out immortality.

But according to the currently believed-to-be-true laws of thermodynamics, our time in this universe is limited too (look up "heat-death of the universe"), so if the machine and the game are sufficiently powerfull that all humans working together until the end of the universe cannot build a factory large enough to hit the hardware limits then i daresay "it was enough power".
At first and second readings, you appear to be saying that Factorio won't ever be optimised enough until a saved game can be expanded until either the player's death of old age, or the universe winds down enough to make life as we know it impossible, whichever comes first.

And they say that gamers have unreasonable expectations.
mudcrabempire
Fast Inserter
Fast Inserter
Posts: 110
Joined: Sun Oct 28, 2018 2:44 pm
Contact:

Re: Game optimization and playability

Post by mudcrabempire »

Deadlock989 wrote: Sat Jan 09, 2021 2:40 pm At first and second readings, you appear to be saying that Factorio won't ever be optimised enough until a saved game can be expanded until either the player's death of old age, or the universe winds down enough to make life as we know it impossible, whichever comes first.
I wouldn´t strictly say it like that. More like: As long as it is possible to reach the hardware limits, there will be some people who will complain about it.
I myself never got close to it.
Deadlock989 wrote: Sat Jan 09, 2021 2:40 pm And they say that gamers have unreasonable expectations.
Wouldn´t call it an "expectation", but a guy can dream, right? 8-)
User avatar
jodokus31
Smart Inserter
Smart Inserter
Posts: 1621
Joined: Sun Feb 26, 2017 4:13 pm
Contact:

Re: Game optimization and playability

Post by jodokus31 »

mudcrabempire wrote: Sat Jan 09, 2021 2:03 pm I´ve seen a few answers saying basically "Improving performance won´t do since then people will just build bigger factories until they hit performance again".
I would like to argue that this is not true.

Building a factory takes time. Building a bigger factory takes more time. Humans have a limited lifetime. Therefore, if the machine and the game are sufficiently powerfull that during a human lifetime, one cannot build a factory big enough to hit the hardware limits, there is enough optimization.
Factorio factories tend to grow exponentially. That means, you double your factory in the same timespan.
F.e.
1k SPM in 10 hours
2k SPM in 20 hours
4k SPM in 30 hours
8k SPM in 40 hours
16k SPM in 50 hours
32k SPM in 60 hours
64k SPM in 70 hours
...
512k SPM in 100 hours

So you double the performance, and can play only 1 timespan longer

Of course it's not exactly like that, but the tendency is like that, if the exponential growth is correct.
How will a computer ever handle that?
Post Reply

Return to “General discussion”