Re: Friday Facts #274 - New fluid system 2
Posted: Sat Dec 22, 2018 10:10 am
N:A has substantially fewer active Steam players than Factorio (and everything else in the category, for that matter). I'm worried about Rocket League.
As far as I understand the algorithm it is slower than the one in 0.16 but because it is an order independent algorithm it is actually possible to multithread it. That along with other optimizations you should get better performance than before even tough the algorithm is slower so there is no downside to implementing this.Sir3n wrote: ↑Sat Dec 22, 2018 12:23 pmDon't get me wrong, I like the algorithm that TheYeast came up with, it's just that I'm concerned about performance in large bases. It is annoying from a gamer's perspective to have to think about, okay, I have to use pipe to ground constantly because that's the way to build the biggest base possible without slowing down everything to a crawl. Plus I like the look of regular pipes. I think it's a shame to have to pipe to ground everywhere.
There are some animation in the pipe windows, that is almost invisible in normal play... So they don't really matterSir3n wrote: ↑Sat Dec 22, 2018 12:23 pmThe FFF says "pipes to ground won’t help you with throughput anymore"
Correct me if i'm wrong, but there is still argument for using pipe-to-ground as much as possible from a megabase performance perspective right?
I'm not sure about the exact number in vanilla anymore, but one pipe-to-ground is worth like 9 or so pipes in cpu time.
I wonder if it would be possible to apply the belt optimization to pipes so that a single series of straight pipes (no intersections) would be considered as a single fluid box.
For one long series of pipes made up of L segments, it can be considered as a single fluidbox L times the size of a regular pipe fluidbox. We can then consider the height level of the fluid in the pipe to be (total fluid / L) for the purposes of calculating how much of it goes into machines or intersections.
This would lose the wave-like behaviour of fluids in pipe though. But I think it's worth it because the wave like behaviour doesn't really matter in a long pipe; what we (as players) really care about is how much throughput we get out of it at the exit for what we put into the pipe.
Furthermore, the realistic wave algorithm wastes unnecessary resources each frame for something that isn't immediately obvious to players: the pipe animation doesn't change based on how much fluid there is in it. It either has fluid, or doesn't. Without enabling the fluid levels overlay, nothing really changes from the player's perspective.
Unlike belts where a player can actually step over things and press F to pick things up, once fluids are in a pipe, it's a locked system, we can't directly interact with the fluid by say, scooping up some of it.
In my opinion, having a less realistic simulation for fluids with instant response, instead of a more realistic simulation that uses up cpu time for something that players can't directly interact with, is worth it. Like I said, I can't press F on the pipe to pick up fluids. So as far as I'm concerned, how the game treats fluids in between input and output doesn't matter as long as it does it in a predictable way.
Don't get me wrong, I like the algorithm that TheYeast came up with, it's just that I'm concerned about performance in large bases. It is annoying from a gamer's perspective to have to think about, okay, I have to use pipe to ground constantly because that's the way to build the biggest base possible without slowing down everything to a crawl. Plus I like the look of regular pipes. I think it's a shame to have to pipe to ground everywhere.
But you have mod for it https://mods.factorio.com/mod/PickerPipeToolsSander_Bouwhuis wrote: ↑Sat Dec 22, 2018 3:12 pmI presume this has been asked many times, but why do pipes auto-connect to each other? It's the nr 1 reason for me to hate Hate HATE pipes.
Why can't I just put 2 pipes next to each other? To connect them we could either have a popup menu to set it, or simply have T-junction pipes and cross-junction pipes (not sure about the correct names/terms for those forms/types).
I want electricity to be as complex as fluids.Loewchen wrote: ↑Fri Dec 21, 2018 8:27 pmJust wait until the I-want-fluids-to-be-as-simple-as-electricity proponents get here...5thHorseman wrote: ↑Fri Dec 21, 2018 8:13 pmI don't know what you guys screwed up, but I'm noticing a distinct lack of complaints in the replies so it must be something HUGE.
No, you can't put the pipes next to each other. It simply does not allow any action that would allow fluid mixing.Selvek wrote: ↑Fri Dec 21, 2018 7:40 pmCan you give us a bit more info on how placing pipes will work with the new anti-mixing logic? Can you confirm or deny that this will allow running parallel pipes without them accidentally intersecting? I could see this being a problem potentially (esp in blueprints) if pipe connection order is dependent on placement order though...
This would work too and it would make some construction easier, but also again allow flooding pipes with a wrong fluid in a setup that you have already prepared. I still think not allowing it at all is a bit better. We will se though.
We will still need o test the blueprints, I don't think we can figure out everything that can happen. AFAIK it should potentially only matter with some conflicting pipes to ground, a rather rare case that the player would still be warded about in the end.Selvek wrote: ↑Fri Dec 21, 2018 7:40 pmCan you give us a bit more info on how placing pipes will work with the new anti-mixing logic? Can you confirm or deny that this will allow running parallel pipes without them accidentally intersecting? I could see this being a problem potentially (esp in blueprints) if pipe connection order is dependent on placement order though...
I am sure I read the request a few times, probably yours too It was a matter of how difficult it would be and how slow. Since the variables are natively in the algorithm, it was easy. Adding any variable cost performance though, which was the main issue and truth is some people are still not sure it is worth it.bobingabout wrote: ↑Fri Dec 21, 2018 9:25 pmLooks like Dominik listened when I mentioned about my mods using the viscocity system and not only included the abillity to do it in the new system, but also used it in the base game.
Wonderful
I understand what you mean, but how often does that happen? And if it does, mostly you already remember what the inputs are our you can have a look at another crafter. It is not ideal though, your are right, if that really proves to be an issue we would deal with it then.featherwinglove wrote: ↑Fri Dec 21, 2018 8:40 pmWith this behaviour, the only way I see solving the problem I left in from my previous post is by breaking all the pipes adjacent to the machine to be able to rotate it or diagnose issues, which is far from ideal. I'm actually quite certain it would behave better than you describe in the current game where an AM2+ only consumes fluid, but I haven't set anything like this up in anger (so to speak) because mixing fluid networks is that much of a disaster that I'm quite paranoid about it. I think I can slap together a test setup when I have more time to play; I certainly wouldn't take the risk in any "real" games.Dominik wrote: ↑Fri Dec 21, 2018 2:53 pmYou would not be able to rotate it back. Any such action attempt will give you a warning about the fluid mixing, so anyone should be able to figure it out. Even if it ends up confusing for somebody, it is still less confusing then the result would be previously.featherwinglove wrote: ↑Fri Dec 21, 2018 2:50 pmOne of the setups I had come to imagine was a workshop machine (AM2 or similar) with three fluid interfaces in different directions, and one item interface direction in the fourth direction. If the recipe is not set, the fluid interface will be visible in absolutely no manner, and it becomes frustrating guesswork to figure out how to rotate the machine before setting the recipe. I can also see similar frustration if someone plunks down a chemical plant or refinery and the pipes leading up to or from it are backwards. Not being able to set the recipe would make it far harder to troubleshoot such a problem than it currently is - at least for inputs. A new player might even mistake this behaviour for a game breaking glitch and throw Factorio out in frustration.
Flow rate - the issue is a part of the game. If one pipe is not enough, well, figure it outCadde wrote: ↑Sat Dec 22, 2018 3:50 amI am sure this new system is better than the old system as pretty much anything would be better than the old system. But i also fear it's also going to be annoying.
Here's a few concerns of mine currently, which i hope can be fixed by the end user through modding at least.
But it's not all concerns of course, i am really glad that splitting flows has been dealt with now. No more intermediate storage tanks with pumps controlled to only pump when all extracting pumps have enough fluid for one tick of operation.
- Flow rate - There comes a point where one needs higher flow rates than what is available through a single piece of vanilla pipe. That is, no matter how many pumps one uses, even a single pipe will be a bottleneck.
In the old system one had to pretty much destroy viscosity of the fluid for it to flow. This because the old system was only dependant on pressure, not actual cross section (volume) of pipe. And you couldn't increase pressure in a sensible manner... In real life, oil trapped underground and suddenly released can shoot out at amazingly high pressures and flow rates. Despite the "pipe" it flows through being rather small.
Machines have massive limitations with pipes in the number of connections they have and where those connections are placed. Limitations that rarely exist for items.
In short, i really hope we can increase pressure and volume of pipe in such a way that getting fluids around hungry machines won't be an issue with this system.
- Time to travel - You mention that fluid amounts < 0.05 will clear out automatically. Well, how fast will this happen? Is it faster than just removing all pipes manually and re-placing them? Again, in real life, pipes are cleaned by scrubbing and washing out the old gunk and takes forever. But factorio isn't real life, one doesn't want to wait.
In Factorio, it usually is enough to place a pump at some end going into a single fluid box to clear a pipe and the length of pipe it clears doesn't really matter as the speed in doing this is damn high anyways. And in the off chance that fluids don't flow (< 0.05 amounts whatever) you simply rotate the pump and try again until all moves in one go due to the flow bonus.
I find myself using the same pipes for different fluids currently depending on what i need at the time. Hence i empty often.
But if fluids emptying is a PITA in the new system i suspect people (me included) are going to fix the issue by modding and if not possible, go back to 0.16 and stay there until it's fixed.
- Upgrading - You mention that using underground pipes won't help now. Well, that has been the only way to increase flow rate currently along with pumps every so often (in my case, pump->pipe->pump->pipe->pump) and this concerns me.
Again, in a real life situation you can always use a bigger pipe. In Factorio however, pipes are one tile wide and that's it. This because machines fluid ports are one tile wide.
So again, how would one be able to perform upgrades to the fluid network once they find that one single pipe is the bottleneck for the whole thing?
It's not as simple as just using two pipes side by side. Getting the fluid in and out of machines is still a massive problem in megafactories because of how pipes connect, how they don't exist neatly side by side (different fluids) and how they are "one size fits all".
I want to be able to use different pipe dimensions and different pipe materials for different applications. If i want extremely high flows i would go with a bigger cross section pipe made with an extremely strong material to be able to pressurize the system to high levels to increase flow rate even for highly viscous fluids.
And i am sure the new system will allow for more options now.
I just hope it's not going to completely destroy the balance of the game just because someone wanted fluids to move "realistically" through pipes.
While finalizing it, ensure that extreme situations can still be addressed in modding and all is good.
Oh and it would be really nice if we could have some flags on fluids too. Such as "corrosive", which would require the use of a pipe material that can take corrosive fluids.
Or "gas", which requires stronger pipes to ensure gasses don't escape through the connections.
And even "max pressure" so if fluids go over that pressure in the system, the fluids would "escape" (not necessarily leak on the ground, that depends on mods that do such things) which would require the use of a stronger pipe.
EDIT: Mind you, i am really tired at the moment so i read the blog post in a dozy state and might not have understood the new system at all.
This remains unchanged, temperature is an independent variable. Fact is I wanted to remove temperature as it is a lot of data for little gain but apparently some mods make a good use of it so it stays.Avezo wrote: ↑Sat Dec 22, 2018 9:46 amHow will this work with non-pipe fluidboxes, i.e. turbines or steam engines? For example, how will low temperature steam mix with high temperature one? Or they just won't? It's technically the same fluid and there were nuclear builds with adding additional steam engines at the end to utilize leftover steam, soooo.
It would indeed be handy and we discuss it every couple months. Issue here is simply our limited time. The current system make the construction more difficult but that is not necessarily bad.roothorick wrote: ↑Sat Dec 22, 2018 10:14 am...
Pipes, well if you don't want to expand on how pipes work, just blocking placement makes sense. But you're missing an opportunity to allow side-by-side fluid networks. You could, say, have a pipe connect to only one fluid system, and when first placing it the player could press R to switch which one it will connect to, visually indicated by what nearby pipes it's connecting to.
...
Yes, the pipe to ground saves some cpu time, but I don't think it is worth any effort. We could still merge the straight pipes (it was discussed in many places before) but it would only help small portion of the pipes and it is currently just a very small portion of the update. So yes, you can still use underground pipes to squeeze out few extra cpu ticks, but I am sure you will always be able to get them elsewhere better with the same effort.Sir3n wrote: ↑Sat Dec 22, 2018 12:23 pmThe FFF says "pipes to ground won’t help you with throughput anymore"
Correct me if i'm wrong, but there is still argument for using pipe-to-ground as much as possible from a megabase performance perspective right?
I'm not sure about the exact number in vanilla anymore, but one pipe-to-ground is worth like 9 or so pipes in cpu time.
I wonder if it would be possible to apply the belt optimization to pipes so that a single series of straight pipes (no intersections) would be considered as a single fluid box.
For one long series of pipes made up of L segments, it can be considered as a single fluidbox L times the size of a regular pipe fluidbox. We can then consider the height level of the fluid in the pipe to be (total fluid / L) for the purposes of calculating how much of it goes into machines or intersections.
This would lose the wave-like behaviour of fluids in pipe though. But I think it's worth it because the wave like behaviour doesn't really matter in a long pipe; what we (as players) really care about is how much throughput we get out of it at the exit for what we put into the pipe.
Furthermore, the realistic wave algorithm wastes unnecessary resources each frame for something that isn't immediately obvious to players: the pipe animation doesn't change based on how much fluid there is in it. It either has fluid, or doesn't. Without enabling the fluid levels overlay, nothing really changes from the player's perspective.
Unlike belts where a player can actually step over things and press F to pick things up, once fluids are in a pipe, it's a locked system, we can't directly interact with the fluid by say, scooping up some of it.
In my opinion, having a less realistic simulation for fluids with instant response, instead of a more realistic simulation that uses up cpu time for something that players can't directly interact with, is worth it. Like I said, I can't press F on the pipe to pick up fluids. So as far as I'm concerned, how the game treats fluids in between input and output doesn't matter as long as it does it in a predictable way.
Don't get me wrong, I like the algorithm that TheYeast came up with, it's just that I'm concerned about performance in large bases. It is annoying from a gamer's perspective to have to think about, okay, I have to use pipe to ground constantly because that's the way to build the biggest base possible without slowing down everything to a crawl. Plus I like the look of regular pipes. I think it's a shame to have to pipe to ground everywhere.
Summary of long post: It doesn't make sense for Factorio to model electricity in any other way than the current model.<NO_NAME> wrote: ↑Sat Dec 22, 2018 4:01 pmI want electricity to be as complex as fluids.Loewchen wrote: ↑Fri Dec 21, 2018 8:27 pmJust wait until the I-want-fluids-to-be-as-simple-as-electricity proponents get here...5thHorseman wrote: ↑Fri Dec 21, 2018 8:13 pmI don't know what you guys screwed up, but I'm noticing a distinct lack of complaints in the replies so it must be something HUGE.
It will be a huge issue if fluid wagons will be locked to a certain type of liquid. Currently there are a few mods to help manage a huge fleet of trains and assign schedules as needed. We still need to be able to park unused trains and then assign schedules as needed. This means we need to be able to request something like "train with 1 engine and 3 empty liquid wagons". Being forced to make a train for each type really counters the whole idea with train automation.arrow in my gluteus wrote: ↑Fri Dec 21, 2018 5:17 pmwhat about fluid wagons? How do pumps know in advance what kind of liquid trains will have when they stop?
This gave me an idea. Say you build a pipeline from a far away oil field to your refinery. You will now need multiple pumps. This will create multiple sections of pipes divided by non-pipe entities, which is great for multi core calculations, but we can do even better.FFF wrote:The forum users produced many ideas on how the system could work. About third of them was a fluid teleportation, many where known but many were entirely new and interesting.