Friday Facts #260 - New fluid system
-
- Manual Inserter
- Posts: 1
- Joined: Fri Sep 14, 2018 2:26 pm
- Contact:
Re: Friday Facts #260 - New fluid system
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.
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.
Re: Friday Facts #260 - New fluid system
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.
P.S. Spoiler tag seems not to work on new forum.
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.
Re: Friday Facts #260 - New fluid system
If so, that sucks. Hope they'll fix the pipe auto-connection then.V453000 wrote: ↑Fri Sep 14, 2018 2:23 pmthriem wrote: ↑Fri Sep 14, 2018 2:20 pm AT this image...*image*
how does/will it split, like - from top to bottomor 1/5 each?
- 1/6
- 1/6
- 2/6
- 1/6
- 1/6
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
Came up with different ideas...However, I fear that I might fool myself there, but I toy with these ideas a little this Weekend :3
- 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)
- 1/6
- 1/6
- 2/6
- 1/6
- 1/6
Re: Friday Facts #260 - New fluid system
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.
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: Friday Facts #260 - New fluid system
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.
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.
Re: Friday Facts #260 - New fluid system
I'm interested - what was your contribution to this FFF?
- 5thHorseman
- Smart Inserter
- Posts: 1193
- Joined: Fri Jun 10, 2016 11:21 pm
- Contact:
Re: Friday Facts #260 - New fluid system
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.
-
- Long Handed Inserter
- Posts: 59
- Joined: Sun Jul 26, 2015 5:08 pm
- Contact:
Re: Friday Facts #260 - New fluid system
I've already been using electric network style pipes for some months now, working well
Re: Friday Facts #260 - New fluid system
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.
Re: Friday Facts #260 - New fluid system
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.
Re: Friday Facts #260 - New fluid system
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”.
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”.
Re: Friday Facts #260 - New fluid system
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/UPS5thHorseman wrote: ↑Fri Sep 14, 2018 3:30 pmWhile 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.
Re: Friday Facts #260 - New fluid system
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.
- 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.
-
- Filter Inserter
- Posts: 276
- Joined: Thu Sep 15, 2016 3:04 pm
- Contact:
Re: Friday Facts #260 - New fluid system
The FFF is a bit sketchy on this, but it might not be "unlimited distance" there.BlueTemplar wrote: ↑Fri Sep 14, 2018 2:15 pm Maybe the pipes will see their cost increased to counterbalance the "unlimited distance" buff?
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.
Re: Friday Facts #260 - New fluid system
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.
Re: Friday Facts #260 - New fluid system
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.
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.
- 5thHorseman
- Smart Inserter
- Posts: 1193
- Joined: Fri Jun 10, 2016 11:21 pm
- Contact:
Re: Friday Facts #260 - New fluid system
I know that. It's one of the reasons I want to be able to control pipe connections.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
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?
Re: Friday Facts #260 - New fluid system
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?
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.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.
Re: Friday Facts #260 - New fluid system
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 .
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: Friday Facts #260 - New fluid system
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?
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.
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?
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.