Page 1 of 1

Do we actually need Pipes to be non-directional? (Looking at Captain of Industry)

Posted: Sun May 07, 2023 4:46 am
by Peter34
Factorio allegedly has huge problems with simulating how fluids flow in Pipes. It costs a lot of CPU and it doesn't always work as one would intuitively assume. At one point the devs talked about giving the fluid systema re-work, but that was apparently dropped.

I myself, when I play, make extensive use of Pumps to make sure stuff flows in the direction I want it to flow, and when I want it to, as soon as I'm doing anything that is more complex than feeding Water to my Boilers.

In some other industry type games, released after Factorio and clearly inspired by it, such as Captain of Industry, pipes for transporting fluids are directional. That is you just don't create a Pipe that connects A and B. You have to choose to create a Pipe that goes from A to B or from B to A. That's a lot lighter on the CPU, obviously.

Would that be an improvement for Factorio?

A relief for the devs? Or would people want to create Circular Pipe systems where certain fluids go in and endless circle from which it's then fed out to where it is needed? I can't see a use case for such a Circular Pipe, but then again I'm not really in the Megafactory mindset. I made one large one, some years ago, and I'd like to make a slightly larger one, but still not a Mega.

Re: Do we actually need Pipes to be non-directional? (Looking at Captain of Industry)

Posted: Sun May 07, 2023 4:49 am
by Peter34
To elaborate, some of the simplifications in other games relative to Factorio, such as Transport Belts only moving one item, instead of having two lanes for the organized movement of two item types to where they're needed, are ones I don't like. CoI would be a lot easier if the Flat Belts had 2 lanes. I'm sure some people who play Satisfactory think the same way.

That's a bad simplification.

But I actually sincerely think that the uni-directional Pipe thing is a good simplification.

Re: Do we actually need Pipes to be non-directional? (Looking at Captain of Industry)

Posted: Sun May 14, 2023 10:22 pm
by Tyrithe
I can't really say I'm too familiar with how pipes are actually programmed, but a point-to-point piping system would be the same with extra steps. Circular systems are used for things like flamethrower defenses, if you could only point to point, either every single tower would need an input AND an output, or you'd need an entirely seperate building to do uni-directional flow, which would just be replacing uni-directional pipes anyway.
The network might just be cached and process whats in each pipe segment when the player wants to look. It doesn't need to be processed constantly from my point of view.

The only times I use pumps is for storage tanks. I don't like the idea of the entire system equalizing and having an 70% empty tank while the pipe system is also 70% empty.

Re: Do we actually need Pipes to be non-directional? (Looking at Captain of Industry)

Posted: Tue Sep 26, 2023 10:46 pm
by jamiechi1
I prefer the pipe system of Captain of Industry. It is a lot easier to deal with than in this game. I believe their pipes are treated like belts internally which would greatly simplify things here.

Re: Do we actually need Pipes to be non-directional? (Looking at Captain of Industry)

Posted: Tue Sep 26, 2023 11:03 pm
by FuryoftheStars
I like the non-directional pipes of Factorio. Are they strictly necessary? Probably not. But I prefer a system that organically prods you into things like pumps vs infinitely running pipes that never do or something hard-coded to say "pump needed after every x segments".

Re: Do we actually need Pipes to be non-directional? (Looking at Captain of Industry)

Posted: Thu Sep 28, 2023 3:43 pm
by Illiander42
Pipes should stay omni-directional.

But there could be some internal optimisations that make building your pipe systems to that fluid flow is mono-directional more CPU and throughput efficent.

Re: Do we actually need Pipes to be non-directional? (Looking at Captain of Industry)

Posted: Fri Sep 29, 2023 6:54 am
by Zavian
Peter34 wrote:
Sun May 07, 2023 4:46 am
Factorio allegedly has huge problems with simulating how fluids flow in Pipes. It costs a lot of CPU and it doesn't always work as one would intuitively assume. At one point the devs talked about giving the fluid systema re-work, but that was apparently dropped.
Do you have specific examples of problems, or just vague assertions that problems exist?

Personally I have no problems with Factorio's fluid simulation being unintuitive, but maybe it is just that I am so used to the issues that I just don't notice them.

If something isn't getting enough fluid then either demand exceeds supply, or I am exceeding the fluid flow of the pipes. If supply exceeds demand, then pipes always backup, unless fluid flow rates are the issue. (In that case the fluid backs up near the source, but the pipe might be nearly empty at the other end).

Fluid flow limits can be surprising for players who don't don't know about them, or haven't paid attention to the fluid flow rates their design requires, but real world pipes also have limited flow rates (for a given fluid, pipe and pressure). Provided that I design my layouts with a short range flow rates of 1200/s max, and medium range flow rates of no more than about 1000/s, I don't run into flow rate problems.

If demand exceeds supply then there can be instances where the machines which aren't receiving supply aren't those players expect, but the real problem is not enough supply, and that is fixed by either increasing supply or using circuit controlled pumps or similar to prioritise which machines get the existing supply.

Sometimes, the cause of not enough supply is because the production of another fluid has caused the producers to back up. That might be surprising to a player who doesn't understand that aspect of the game, but it is consistent with how most machines in Factorio eventually stop when they back up.

I also don't feel that the fluid simulation "costs lots of cpu". Yes it does costs cpu, but so do belts inserters, trains, biters and everything else. If you just keep building larger you will eventually run into performance problems whatever the devs do, even if they made each pipe system one large tank.

Do you have a specific example where the fluid system is to blame for excessive cpu use?

I'll point out my current in progress Seablock campaign uses a lot of different fluids and has an extensive fluid bus (all those blue pipes on the left of the map screenshot, and also scattered through other sections of the base). Yet the fluid manager uses about 0.1ms/tick. Later on, when I start scaling up for the FTL techs I will need to either run multiple pipelines for some of those fluids, and/or move some of them by train, otherwise I will run into fluid flow rate issues.
Seablock 2023-09-29 151642.png
Seablock 2023-09-29 151642.png (6.36 MiB) Viewed 1155 times
Seablock2 2023-09-29 152038.png
Seablock2 2023-09-29 152038.png (971.6 KiB) Viewed 1155 times
One-Directional Pipes
For me Vanilla bases tend to have a layout where a one directional pipe flow would work. (Producers are generally concentrated close together, and consumers are located elsewhere.

But with some modpacks, (eg my current Seablock campaign), I have lots of producers and consumers located in different areas of my base. Often these producers produce a liquid byproduct, which is an essential ingredient of multiple other processes located in different areas of my base. Depending on what parts of my base are currently running the fluid flow direction might change from minute to minute.

Could I redesign my base to cope with one-directional pipes? Yes, I could. But that would probably increase the number of pipes I use, potentially wiping out any performance advantages one directional pipes would have.

This base is already larger than many vanilla non-megabase bases, and fluid manager time usage is about 0.1ms per tick. Compare that to entity time usage of about 1 ms per tick, and belt usage of about 0.1ms/sec (despite there being more pipes than belts), and I don't see that fluid performance is a problem for average bases.

For people building 10k+ SPM bases then sure, performance of every entity type is probably a concern. But every time the devs improve game performance, megabase builders use the extra performance to build larger bases, and then complain that they are once again limited by performance. Back when I first bought the game one rocket per minute was considered a mega-base. Performance has improved massively since then, (admittedly some of that is because of faster computers, but a lot is game performance improvements).

Re: Do we actually need Pipes to be non-directional? (Looking at Captain of Industry)

Posted: Fri Sep 29, 2023 7:01 am
by Khagan
Zavian wrote:
Fri Sep 29, 2023 6:54 am
Provided that I design my layouts with a short range flow rates of 1200/s max, and medium range flow rates of no more than about 1000/s, I don't run into flow rate problems.
Exactly so. And if the pipe is so long that you can't sustain 1000/s without pumps along the way, it's time to replace the pipe with fluid wagons.

Re: Do we actually need Pipes to be non-directional? (Looking at Captain of Industry)

Posted: Fri Sep 29, 2023 8:59 am
by aka13
If you are not laying 3k pipes you are missing out on all the fun of orienting the stupid pumps and pipe grid alignments :D