Friday Facts #260 - New fluid system

Regular reports on Factorio development.
fooliodisplasius
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Sep 14, 2018 2:26 pm
Contact:

Re: Friday Facts #260 - New fluid system

Post by fooliodisplasius »

The drawing of the pipes can mimic the segment model and show only 1 "windowed" pipe per segment. This way you don't have to do additional calculations for each pipe in a segment. Personally, when I design a pipeline, I only care about segments as well when verifying that fluids go where it should. I don't care about individual pipes.

For segments that are larger than a screen, you could add more windowed pipes, but all could render the same volume without breaking immersion, since you can only see 1 at a time anyway.
Avezo
Filter Inserter
Filter Inserter
Posts: 454
Joined: Fri Apr 01, 2016 3:53 pm
Contact:

Re: Friday Facts #260 - New fluid system

Post by Avezo »

Heat pipes follow the same mechanics, no? Because if they do, I can see a big problem, because having heat pipes in 2*x rows is pretty common (see image), they would be basically full of junctions, which would make performance even worse.

Image

P.S. Spoiler tag seems not to work on new forum.
Last edited by Avezo on Fri Sep 14, 2018 2:51 pm, edited 1 time in total.
thriem
Inserter
Inserter
Posts: 26
Joined: Fri Mar 30, 2018 1:05 pm
Contact:

Re: Friday Facts #260 - New fluid system

Post by thriem »

V453000 wrote: Fri Sep 14, 2018 2:23 pm
thriem wrote: Fri Sep 14, 2018 2:20 pm AT this image...*image*
how does/will it split, like - from top to bottom
  1. 1/6
  2. 1/6
  3. 2/6
  4. 1/6
  5. 1/6
or 1/5 each?

I made some thoughts about the algorithm... I wish I had a demanding sample to see the complexity. I toy around and see for myself how hard this can be :D

Came up with different ideas...
  • Each drain/requester creates/searches a path to the source, may join existing paths - after each entity, go from source to requester(dead ends are requester too)
  • Each junction is a "storage tank", with an listener to the source (whenever its output changes) and release (up to) *maximum flow* split between all demands - the flow visualization apply to segments... each entity had a listener to the closest source or tank(including junctions)
However, I fear that I might fool myself there, but I toy with these ideas a little this Weekend :3
  1. 1/6
  2. 1/6
  3. 2/6
  4. 1/6
  5. 1/6
If so, that sucks. Hope they'll fix the pipe auto-connection then.
Image
Avezo
Filter Inserter
Filter Inserter
Posts: 454
Joined: Fri Apr 01, 2016 3:53 pm
Contact:

Re: Friday Facts #260 - New fluid system

Post by Avezo »

Image
Image
Image

Don't wanna sound negative, but thinking about actual setups used in game (see pictures) and seeing how many junction there are and relatively few straight pipe sections, I'm not sure it would really be that much of an optimization to be honest.
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Friday Facts #260 - New fluid system

Post by bobingabout »

I have only 2 disappointments.
1. You didn't let me write my contribution to the FFF.
2. The forum doesn't scale to the width of my window. https://www.youtube.com/watch?v=DtRNg5uSKQ0

Other than that, I like the direction this is heading.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
Metuk
Burner Inserter
Burner Inserter
Posts: 5
Joined: Mon Dec 18, 2017 5:35 pm
Contact:

Re: Friday Facts #260 - New fluid system

Post by Metuk »

bobingabout wrote: Fri Sep 14, 2018 2:55 pm 1. You didn't let me write my contribution to the FFF.
I'm interested - what was your contribution to this FFF?
User avatar
5thHorseman
Smart Inserter
Smart Inserter
Posts: 1193
Joined: Fri Jun 10, 2016 11:21 pm
Contact:

Re: Friday Facts #260 - New fluid system

Post by 5thHorseman »

thriem wrote: Fri Sep 14, 2018 2:47 pm
V453000 wrote: Fri Sep 14, 2018 2:23 pm
  1. 1/6
  2. 1/6
  3. 2/6
  4. 1/6
  5. 1/6
If so, that sucks. Hope they'll fix the pipe auto-connection then.
While I would also like to dictate how pipes connect, I don't see why this is an argument for it. How would you split 1 pipe into 5 to force 1/5th flow in each by specifying connections, that couldn't be done with auto-connected pipes?

I'll admit I haven't given it a ton of thought but I did just spend a few minutes in paintbrush drawing it out and nothing jumped out at me.
sarcolopter
Long Handed Inserter
Long Handed Inserter
Posts: 59
Joined: Sun Jul 26, 2015 5:08 pm
Contact:

Re: Friday Facts #260 - New fluid system

Post by sarcolopter »

I've already been using electric network style pipes for some months now, working well
Xheotris
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri Sep 14, 2018 3:25 pm
Contact:

Re: Friday Facts #260 - New fluid system

Post by Xheotris »

So, about tainted plumbing systems. The HVAC-simulator Oxygen Not Included has an interesting mechanic for dealing with wrong fluids in a pipe/vent network. A fluid consumer just pulls any fluid/gas from the system, regardless of what it's supposed to receive. When a consumer receives the wrong substance, it takes a small amount of damage and annihilates the fluid. I think it's a neat method. You might consider it.
User avatar
Oktokolo
Filter Inserter
Filter Inserter
Posts: 884
Joined: Wed Jul 12, 2017 5:45 pm
Contact:

Re: Friday Facts #260 - New fluid system

Post by Oktokolo »

Lemlin wrote: Fri Sep 14, 2018 1:22 pm
Another point left to consider is how to solve accidentally connecting pipes and tainting your whole oil system with water.
Same mechanic as we have for belts would be nice.
I would like to have the same mechincs like for laying rails. Draw straight pipes and only where the new pipe overlaps an old one, connections are made.
Stlyau
Burner Inserter
Burner Inserter
Posts: 19
Joined: Sat Jan 06, 2018 1:36 pm
Contact:

Re: Friday Facts #260 - New fluid system

Post by Stlyau »

Maybe I’m taking a seriously simple and naive approach here, but hear me out.

1) Belts are uni-directional.
2) Entities such as Boilers, Refineries and Chem Plants have dedicated input/output locations.

Now, why coukdn’t straight pipes act like belt segments and flow one direction. Underground pipes could be like underground belts with the flow direction changable by rotation hotkey. Pumps would still be useful to increase flow speed or circuit controls.

Since straight pipes would now be uni-directional, they would determine flow direction at junctions much like side loading a belt. I know what you’ll say, “What about the T-intersections everyone uses to input Refineries or Chem Plants?” Simple... a new technology is introduced to make T and 4-way pipes, definitely the T pipes. It would give 3 versions, 1 with inputs both ends and output center (like a Boiler), and the other 2 would input one end and center while outputting other end. There wouldn’t be one that input center and output both ends as it just brings us back to the current split flow issues. The 4-way woukd be 3 inputs and 1 output, but that could be done just by uni-directional pipe line and in a sense “side loading”.
thriem
Inserter
Inserter
Posts: 26
Joined: Fri Mar 30, 2018 1:05 pm
Contact:

Re: Friday Facts #260 - New fluid system

Post by thriem »

5thHorseman wrote: Fri Sep 14, 2018 3:30 pm
thriem wrote: Fri Sep 14, 2018 2:47 pm
V453000 wrote: Fri Sep 14, 2018 2:23 pm
  1. 1/6
  2. 1/6
  3. 2/6
  4. 1/6
  5. 1/6
If so, that sucks. Hope they'll fix the pipe auto-connection then.
While I would also like to dictate how pipes connect, I don't see why this is an argument for it. How would you split 1 pipe into 5 to force 1/5th flow in each by specifying connections, that couldn't be done with auto-connected pipes?

I'll admit I haven't given it a ton of thought but I did just spend a few minutes in paintbrush drawing it out and nothing jumped out at me.
Well, that's easy to explain. If you have a setup, like offshore-pumps or chemical plants with their output facing to another, you can, instead filling 1 pipe, use 2 pipes - if those would not connect, you have less junctions and there for better performance/UPS
Image
Avezo
Filter Inserter
Filter Inserter
Posts: 454
Joined: Fri Apr 01, 2016 3:53 pm
Contact:

Re: Friday Facts #260 - New fluid system

Post by Avezo »

I still think "nuclear" electric network option would be the best - flow could be limited by adding another property to the entire network(not every single entity) - capacity - based on amount of pipes and tanks in it. Amount of fluids that could be drawn from or pumped in would be limited by this amount. This still raises few problems:
- Long pipes could support more plants, so capacity perhaps would need some sort of 'hard cap'.
- Short pipes might have the opposite problem, so perhaps there should be hard cap on minimum capacity, regardless how short the pipe network is.
Benefits:
- Input/output would be calculated only for end points for every game tick, based only on 'capacity' property.
- Flow amount and direction would be calculated separately given the state of the end points and current capacity - BUT - it wouldn't need to be calculated every game tick - it's just not needed in such approach. Then it would be just 'overlayed' over each piece of pipe network with note 'average' flow rate/direction/etc. Exact values updated every tick are just not needed in current state of the game.

Overally, I think huge performance benefits warrants some complexity like this.
meganothing
Filter Inserter
Filter Inserter
Posts: 265
Joined: Thu Sep 15, 2016 3:04 pm
Contact:

Re: Friday Facts #260 - New fluid system

Post by meganothing »

BlueTemplar wrote: Fri Sep 14, 2018 2:15 pm Maybe the pipes will see their cost increased to counterbalance the "unlimited distance" buff?
The FFF is a bit sketchy on this, but it might not be "unlimited distance" there.

If the length of a segment is stored it should be quite easy to use a length-dependent function for the throughput. And I think the word "calculation" in the sentence "No matter how long it is, it will be evaluated in one calculation" hints at that already being the case.
adam_bise
Filter Inserter
Filter Inserter
Posts: 442
Joined: Fri Jun 08, 2018 10:42 pm
Contact:

Re: Friday Facts #260 - New fluid system

Post by adam_bise »

Couldn't you add a segment limit? Even if it were a very high number there wouldn't be instant flow across miles of pipe.
gustaphe
Inserter
Inserter
Posts: 27
Joined: Thu Oct 27, 2016 6:50 am
Contact:

Re: Friday Facts #260 - New fluid system

Post by gustaphe »

Fluid dynamics is crazy complicated.
As much as I would love for Factorio to become a realistic power generation simulator with pressures, heat capacities and flow rates, maybe there just isn't a way to achieve that and still have a playable game.
User avatar
5thHorseman
Smart Inserter
Smart Inserter
Posts: 1193
Joined: Fri Jun 10, 2016 11:21 pm
Contact:

Re: Friday Facts #260 - New fluid system

Post by 5thHorseman »

thriem wrote: Fri Sep 14, 2018 3:43 pm Well, that's easy to explain. If you have a setup, like offshore-pumps or chemical plants with their output facing to another, you can, instead filling 1 pipe, use 2 pipes - if those would not connect, you have less junctions and there for better performance/UPS
I know that. It's one of the reasons I want to be able to control pipe connections.

But I don't see why the 1/6 vs 2/6 in the above example supports it.

It's like saying "I drive a Toyota so obviously it's Friday." It's Friday which is true, but why does driving a Toyota make it so?
User avatar
Durabys
Fast Inserter
Fast Inserter
Posts: 236
Joined: Mon Apr 18, 2016 3:30 pm
Contact:

Re: Friday Facts #260 - New fluid system

Post by Durabys »

Also. How is this system going to react to someone making a super long pipe across the map from an oil field and putting ten pumps at intervals into the pipeline? Would the entry into and exit out of a pump count as a junction?
So as long as you don’t do crazy stuff like making pipe grids and keep your pipes straight, they will have zero effect on UPS.
What you just heard was the sound of every griefer and troll squealing in joy. Griefing was never this easy. Putting the entire MP server into lockdown within a minute.
Madoxen
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Sep 14, 2018 4:27 pm
Contact:

Re: Friday Facts #260 - New fluid system

Post by Madoxen »

How about using routing system that will be sending packets around fluid network, with contents like: Type of fluid, numerical value and destination ID? It could work like in Simcity or Cities Skylines, or pretty much any computer network but with packets that are traveling slow. I think that it would be possible to visualize it nicely (eg. pipe would fill up more if more packets would travel through that pipe in some period of time) and there is benefit that there are many routing algorithms so there could be one that would fit your needs :) .
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Friday Facts #260 - New fluid system

Post by bobingabout »

Actually, reading a few of these posts, I had a question.
what about "pipe" based entities (in this case, it's a storage tank) that have an input connection and an output connection that are basically just a pipe to force a flow direction?
Metuk wrote: Fri Sep 14, 2018 3:11 pm
bobingabout wrote: Fri Sep 14, 2018 2:55 pm 1. You didn't let me write my contribution to the FFF.
I'm interested - what was your contribution to this FFF?
I've been working on this for 2 weeks, so I'll post a screenshot.
https://www.dropbox.com/s/exwhtp1c3qgaa ... 9.png?dl=0
note: for testing reasons and it's easy to obtain nature, I gave water a fuel_value, so think of it as some kind of "Fuel" oil in everything except the boiler's normal water input.
Also, this is a feature I wrote for modding, it is unlikely (if it even makes it into the game engine) that anything in vanilla will use this feature.
Also, this is actually 2 separate features. "Fluid energy source" and "reactor dynamic energy source", I just used the first feature with the second to make a reactor powered by "oil", then another powered by "steam"

Not pictured here is also a steam powered boiler, because Klonan dared me to do it. That's in another screenshot. Yes, it is as dumb as it sounds.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
Post Reply

Return to “News”