Game optimization and playability

Post all other topics which do not belong to any other category.
User avatar
jodokus31
Smart Inserter
Smart Inserter
Posts: 1623
Joined: Sun Feb 26, 2017 4:13 pm
Contact:

Re: Game optimization and playability

Post by jodokus31 »

ssilk wrote: Fri Jul 23, 2021 3:02 am So, please, before you might come back next year and continue :) , provide us with the information we need to tell you, why you have problems. Because — when you look at this thread — it seems that your problem is not very common.
Not common?
It's just the usual UPS cap, that at some point the computer is not able to handle everything in time?
With the tools provided, it's very easy to duplicate your factory again and again.

But it's not really a problem, which can be solved without compromise. If you had a computer, which is double as fast as now, you can play ~1h longer to double your factory :D

If you play multiplayer, you might have a look at clustorio, which scales with count of computers.
gujarat6
Inserter
Inserter
Posts: 31
Joined: Wed Apr 08, 2020 4:53 pm
Contact:

Re: Game optimization and playability

Post by gujarat6 »

jodokus31 wrote: Sat Jul 24, 2021 8:11 am
ssilk wrote: Fri Jul 23, 2021 3:02 am So, please, before you might come back next year and continue :) , provide us with the information we need to tell you, why you have problems. Because — when you look at this thread — it seems that your problem is not very common.
Not common?
It's just the usual UPS cap, that at some point the computer is not able to handle everything in time?
With the tools provided, it's very easy to duplicate your factory again and again.

But it's not really a problem, which can be solved without compromise. If you had a computer, which is double as fast as now, you can play ~1h longer to double your factory :D

If you play multiplayer, you might have a look at clustorio, which scales with count of computers.
Clustorio is the only solution, buy more pcs to host more servers! And I really mean it, for now this is the best solution, there is no way you will get more performance out of your PC to play the game 2x as long let's say.
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Game optimization and playability

Post by ssilk »

gujarat6 wrote: Fri Jul 23, 2021 6:44 pm Yeah I mean I'm playing on 3900X with 32 GB 3600mhz ram and GTX 1070 Ti. Win10 obviously. We are playing on vanilla sometimes, sometimes with the factorio extended mods family, it always ends the same way lol. Single-player games last longer, but it's the same problem, just a bit further down the line. We make the factory bigger and bigger, delete the whole thing at some point, place a block of few thousand furnaces, and build around that. Biters disabled (waste of UPS). I'm not even sure if there is a point in continuing this, because it will end the same way as always at some point. You cannot get the bases big, you can design them big with perfect resources and cheats, you can't play big and do what you want, place how many entities as you want cuz you'll lag the game to death. Always there is this boundary which you cannot cross, you just can't, game engine and CPU power don't allow it simply, which is really sad, because the game is crazy good. Have a good evening Sir.
Good morning.
This sounds as I thought. And jodokus31 explained it already.

From the hardware, the cheapest thing you can do is to put faster RAM into it. (I don’t know your Ram-type, so excuse me, if that is already the case). Factorio is extremely hard pushing on Ram-transfer, at some point the memory throughput is the main bottleneck, not the CPU!

Another strategy is to parallelise it:
Clustorio (as already said by gujarat6)
As far as I know, you need to have many servers, one for each world. And keep care about building things similar big on each server.


There are several more strategies to push this hardware limit further. But all those strategies have to do with changing your target / playstyle. Because —I also don’t know how far you know that — the speed of Factorio is dependent on how many item-operations you make per second. Operations are here swings of inserters, cooking a recipe, calculation of the flow in pipes, number of bots in the air, number of trains running, calculation of electric power, number of items on belts… and much more, but that are in general the biggest issues, without any order. A very detailed source of information about this is of course the internet and there especiallythe Factorio Benchmark Website https://mulark.github.io/test-index.htm
Did you for example know, that 45 degree rails/trains take more cpu, than 0/90 degree?

So this means, you have to avoid those things to build bigger factories. ;)

These are the things I know or have heard from. So I’m not an expert in all of that. Please correct me, if I’m wrong!

In general I really recommend how others make things and try to rebuild it. My very first source is the “show your creations”-board here viewforum.php?f=8 and especially the viewforum.php?f=204 Medium/Big/Gigantic Sized Structures sub board.

Download some of the maps, study them. If you find, that your computer cannot handle the world with about the speed the maintainer has told, something itchy is going on. Deeper inspection needed in that case.

Another good source of inspiration is Reddit.

The question is always: how did they do it and would it be fun for me to make something similar. Or can I even push that concept further?

There are some general things you can do to increase speed:

Rail based assemblies
Instead of putting things on belts, transport them to a train station, load it in chests, wait for train, load it into the train, travel with the train to the target etc. you make everything directly.
Some examples:
viewtopic.php?f=204&t=63020 Gigatrains: 720-car trains supplying a 10K science/min base
viewtopic.php?f=204&t=86930 Train based direct insertion challenge

Use solar
As said, pipes are a big cpu-eater in Factorio. So don’t build nuclear plants, build solar plants. This eats up xtremly large space and the size of your factory grows, which takes then very much time to load/save the game. For that I can recommend to use mods that increase the solar/accumulator capacity, see https://mods.factorio.com/query/Solar?version=1.1

Use Modules
As said the main issue is the handling of items. The assemblies are one core factor: the more work at the same time, the slower. So if you can reduce the numbers of assemblies, you gain speed. The simplest way do do that is to add speed modules to assemblies. The smarter way is to add productivity modules and surround it with beacons with speed modules. You can see that for example here viewtopic.php?f=204&t=90233 10k SPM bot-free train-heavy modular base

Don’t use bots
Well of course you need some bots to construct (you might split your base into several logistic areas to speed up construction), but I think especially to the logistic bots. What takes here cpu time is A) the logistic system itself B) moving the bots around, charging etc.
Don’t use logistic bots for bulk transport. They are either useful for transport stuff for producing rare things like shields for your power suit etc. or for short time transfers (e.g. sorting out stuff from a train).

Keep belts either completely compressed or completely empty
Any moving item on belts needs to be calculated. So an empty belt is a good belt. :) on the other hand Factorio optimizes chunks of items on belts and moves them as if they are one item, if they are fully compressed. So the worst case is a very long belt where the items have a distance of one pixel to each other. For those I recommend to use mechanisms to compress at least one side of the belt. Much better is using trains for that, I would say a belt is worth replacing for distances larger than 500-1000 tiles.
Edit: when I look at the debug-mode for that, I see, that this gap-problem seems also to have been solved. But I think in general this is still correct, because the more compressed the more items are transported at once.

Live with it :shock: 8-) :mrgreen:
Many players, including me, live with only 30 UPS. Half the speed is acceptable in my opinion, below it gets really tedious. :D To speed things up a little bit I can recommend a teleporter mod like https://mods.factorio.com/mod/Teleporters
(There are some others https://mods.factorio.com/query/Teleporter?version=1.1 )
Also some mods to increase running speed, crafting, reach length etc. There are several ways to do that.


Using stacked recipes
Now we are clearly leaving vanilla gameplay!
As already said one main issue is how many items needs to be handled at once. The stacking (also known as boxing, pallets, compression, …) puts many items into one stack-item. The simple mods end here, you can stack and unstack items and so you spare a lot of space and logistics and you even can use logistic bots to bulk transfer stacked iron ore. :)
Stacking can increase the speed of your factory by some factors. I was able to build a factory with incredible amount of science packs per minute (uhm, I forgot how much).
The advanced mods allow also to assemble with these stacked items. There are a just new recipes for that. The most known and best supported mod for that is https://mods.factorio.com/mod/deadlock- ... es-loaders together with https://mods.factorio.com/mod/deadlock_stacked_recipes.
There is a whole world of other mods based on that concept, see
https://mods.factorio.com/query/Deadloc ... ersion=1.1
I use for example also https://mods.factorio.com/mod/DeadlockS ... ForVanilla
https://mods.factorio.com/mod/Stacked_Mining
The whole family is intransparent as hell. I’m sorry. It took me a while to find out what mods I use and in which balancing, you need to experiment with it to find your sweet spot.
Ah yes, lately there is also compressed fluids, which I haven’t tested yet, but this should speed up things also. https://mods.factorio.com/mod/CompressedFluids - also a whole family of mods around it.


Use the debug mode
https://wiki.factorio.com/Debug_mode explains the debugging. Many functions of that can be used to see where the speed loss came from, but you need to dig a bit into this area, I won’t explain the details here.

Turn factory parts on/off as needed
Now we come to an area, where speeding things up is uncertain.
One thing I already tried and will try again with my next factory is turning parts down.
The idea is, that the factory is totally overproducing everything. So you don’t need to produce everything every time. In that case you can turn that production off. There is the power switch to turn all off, but before that you need to clear all the belts, because as said above, things on belts or near inserters takes CPU. The result is complex and outcome is unclear. When someone has already tried that please write. :)

Summary

So — all in all I can say this: if you always try to do it the same way, it will result in the same problems. :) so to make Factorio faster, you have really many options, internet is your friend, but in the end there is no other way than to change your play-style. Because Factorio cannot change much more, it’s extremely high optimized, the fact that you can come to a point, where the memory throughput is the main bottleneck shows that very exactly.

This is an insight, we need to live with. Hope comes from new kinds of CPUs, or using the GFX-card to calculate things or so, because the software side is here really on its limits. But this also keeps the door wide open for new ideas to go around those limits and still having fun playing. I mean it’s a kind of art to find these kinds of compromises.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Dethdude
Manual Inserter
Manual Inserter
Posts: 4
Joined: Mon Sep 04, 2017 9:08 pm
Contact:

Re: Game optimization and playability

Post by Dethdude »

I suspect, as others have said, if you want longer playthrus you'll have to change your playstyle, because in any game there will be a limit where getting bigger game files requires more computer resources which will result in less performance.

So, the fix is tougher mods that take longer to get to endgame, or a reduction in resources which will take longer to get to endgame, or something else that slows down getting to endgame.
LMBLue
Manual Inserter
Manual Inserter
Posts: 1
Joined: Wed Sep 08, 2021 2:06 pm
Contact:

Re: Game optimization and playability

Post by LMBLue »

I have a weak computer, but I play without problems
Post Reply

Return to “General discussion”