Page 1 of 15
Friday Facts #260 - New fluid system
Posted: Fri Sep 14, 2018 1:03 pm
by Klonan
Re: Friday Facts #260 - New fluid system
Posted: Fri Sep 14, 2018 1:18 pm
by Vandroiy
Yes yes yes, more pipe performance!
As much as I like hydrodynamics simulators, Factorio gameplay just doesn't benefit from simulating every little piece of pipe, while the performance impact is huge.
The main reasons I stopped playing on our megabase are pipe performance and solar panels. We eventually started "hacking" to disable pipes around nuclear plants and simulate their power production, but it didn't work out too well for various reasons. But nobody wanted to place any more solar panels, so the game got stuck there.
Re: Friday Facts #260 - New fluid system
Posted: Fri Sep 14, 2018 1:22 pm
by Lemlin
Another point left to consider is how to solve accidentally connecting pipes and tainting your whole oil system with water.
So will the placement mechanic of pipes be improved now too since pipe designs is getting more important for performance?
I hate when they auto-connect to nearby pipes.
Same mechanic as we have for belts would be nice.
Re: Friday Facts #260 - New fluid system
Posted: Fri Sep 14, 2018 1:29 pm
by cbhj1
A couple thoughts come to mind regarding nuclear as mentioned.
Which pipe system was the bigger performance hog? (fluids vs heat)
If something like this gets implemented for heat pipes, will probably need to have reactors combine for calculations due to the grid layout.
Re: Friday Facts #260 - New fluid system
Posted: Fri Sep 14, 2018 1:35 pm
by SuperSandro2000
The site looks good on mobile but the inserters next to the avatars are a bit off and the edit buttons on the right could be a bit more to the right.
And it shows not my total post count.
Re: Friday Facts #260 - New fluid system
Posted: Fri Sep 14, 2018 1:35 pm
by BlueTemplar
So as not to fill the discussion too much with "new" forum details, maybe consider directing the flow of discussion about it in the already created topic :
viewtopic.php?f=55&t=62457
?
Re: Friday Facts #260 - New fluid system
Posted: Fri Sep 14, 2018 1:38 pm
by Muppet9010
Great to see what you tried and how you got to your current proposal. These details are good at giving an insight in to the development vision.
Re: Friday Facts #260 - New fluid system
Posted: Fri Sep 14, 2018 1:46 pm
by smartiel
Naive question: why not use a very simple chip firing game model?
Re: Friday Facts #260 - New fluid system
Posted: Fri Sep 14, 2018 1:49 pm
by Tankh
sooo on average, how many pipes do you need per section for every junction in a system for it to run than faster the old system?
Re: Friday Facts #260 - New fluid system
Posted: Fri Sep 14, 2018 1:54 pm
by orbit
Hi,
I am thinking if you are doing that kind of rework will it be possible to monitor fluids via any signals?
To put some kind of monitor.
When I was reading last FFF I came to few ideas, maybe you will find them usefull.
- Valves - one way valves could simplify fluids flow as you could omit one direction of flow.
- settings on pumps - pumps could acts as valves although atm they "ppump" everything they have available. If they could as above one way valve - without actually pumping.
- Either Valves or Pumps could be point where you could get information about fluid flow (0-100)
And some questions:
How many unit of fluid can be in any part? 1 part of pipe, pump and what is the smalles unit of fluid?
Re: Friday Facts #260 - New fluid system
Posted: Fri Sep 14, 2018 2:01 pm
by ske
Could we apply this system to the electric network when we employ the following changes?
- The high voltage network (big masts) are sparsely connected. Like they are already now.
- The new fluid system is applied to the high voltage network.
- Transformers actually act as transformers between the high and low voltage networks.
- The low voltage network does not rely on fluid dynamics. The consumers get a local "distance penalty" where the power supply will diminish with distance to the closest transformers/generators. Some efficient and relatively simple algorithm that doesn't need to do very time consuming calculations or strives to be a physically correct representation of an electric network but acts a bit similar to how you would expect an electrical network to behave.(*)
- Some more tricks to make it look nice in practice without hurting performance too much.
I am still hoping for a more sane approach to power that would actually make it interesting and challenging to provide the power locally to big consumers. The current system is just too flat for my taste.
*: I like the pragmatic approach you have taken to get performance, pseudo-realism, fun and time constraints under one hood. And I'm feeling that you would be the right person to rethink the electrical network once the fluid system has hopefully proven to be what we hope it to be.
Re: Friday Facts #260 - New fluid system
Posted: Fri Sep 14, 2018 2:04 pm
by Matthias_Wlkp
Nice!
Do I understand correctly that it would be a stretch to expect 0.17 this year?
Re: Friday Facts #260 - New fluid system
Posted: Fri Sep 14, 2018 2:11 pm
by ledow
Electrical networks which can "burn out" their upstream thin cables if you over-use them seem sensible. The UPS cost will be enormous, though.
Fluid ideas sound good. A storage tank is surely just a pipe with a four-way junction, no? Directionality, etc. is just a pain to code but shouldn't be too much trouble, I think. The roundings and proper empty/full rather than psuedo-empty/full are nice but I don't see them as necessary.
Float/int probably isn't worth the effort.
But I think the instant-transfer thing is a bit cheaty - someone's gonna run a single huge run to oil ten miles away and it'll function likes it's local.
Maybe every (say) ten pipe squares is one "segment" to calculate on. Then you get flow, you're not calculating every square (and underground/right-angles are just straight-pipe from the point of view of the code), but you also get a flow / delay as it pushes through.
Pumps are presumably just modelled as a one-way spill-split?
Re: Friday Facts #260 - New fluid system
Posted: Fri Sep 14, 2018 2:14 pm
by ske
Matthias_Wlkp wrote: ↑Fri Sep 14, 2018 2:04 pm
Nice!
Do I understand correctly that it would be a stretch to expect 0.17 this year?
As I understood they wanted 0.17 to be the last version before 1.0 is released. Therefore all the nice features that they really really want need to be crammed in before it's too late. That is combined with a few new people working on problems that were left aside in the past which increases the number of new features. The other goal is to release before christmas and I can't see that both could be achieved as they are cramming in a lot of awesome features of which some will have some unintended consequences that need some more work. I'm kind of hoping for 0.16½ in the meantime with a subset of new features and think that after 0.17 there will at least be 0.17½ and 0.17¾ before 1.0 will finally be announced.
Re: Friday Facts #260 - New fluid system
Posted: Fri Sep 14, 2018 2:15 pm
by BlueTemplar
@ledow : Yeah, currently a storage tank is basically just a pipe size x250 (and 3x3 footprint with specific junctions).
Maybe the pipes will see their cost increased to counterbalance the "unlimited distance" buff?
@ske : interesting gameplay comes from having different systems... So having the electric system work exactly like the fluid system would make for less interesting gameplay? (and might be too complex for new players?)
Though, I hope modders will eventually have the opportunity to add new fluid mechanics to the game : your electric fluid system, the 0.16 fluid system once the 0.17 one will have replaced it, and so on !
Re: Friday Facts #260 - New fluid system
Posted: Fri Sep 14, 2018 2:17 pm
by ske
ledow wrote: ↑Fri Sep 14, 2018 2:11 pm
Electrical networks which can "burn out" their upstream thin cables if you over-use them seem sensible. The UPS cost will be enormous, though.
This thinking is beautiful. Maybe the cables will just glow red/white hot instead of burning out. This would give the player a good indication of where the choke-point lies and why the consumers aren't getting enough.
Re: Friday Facts #260 - New fluid system
Posted: Fri Sep 14, 2018 2:18 pm
by irbork
I like the nuclear option best
For all the disadvantages presented, none sticks.
"There would be no visualisation or indication of the flow of fluid." - There would not be a reason someone would need one.
"There would be unlimited throughput, one water pipe could supply all boiler and reactor setups." - What? One boiler can supply entire factory but still everybody build many more. So this one is true only for someone who does not care that all supplied entities are working at percentage of their capacity.
"It abstracts away part of the realism and charm of the game. (While this is subjective at best, it does mean something to us.)" - Exactly, subjective. It is really charming trying to minimize pipe amount to increase performance. BTW you cannot send all the electricity from nuclear power plant to customers by a single wire on a wooden pole.
And now that I managed to read today's post to the end I feel the new system seems like a fair compromise, as long as it will be possible to implement in 0.17
Re: Friday Facts #260 - New fluid system
Posted: Fri Sep 14, 2018 2:20 pm
by thriem
AT this image...
how does/will it split, like - from top to bottom
- 1/6
- 1/6
- 2/6
- 1/6
- 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
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
Re: Friday Facts #260 - New fluid system
Posted: Fri Sep 14, 2018 2:23 pm
by V453000
thriem wrote: ↑Fri Sep 14, 2018 2:20 pm
AT this image...
how does/will it split, like - from top to bottom
- 1/6
- 1/6
- 2/6
- 1/6
- 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
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/6
- 1/6
- 2/6
- 1/6
- 1/6
Re: Friday Facts #260 - New fluid system
Posted: Fri Sep 14, 2018 2:29 pm
by Drury
ske wrote: ↑Fri Sep 14, 2018 2:01 pm
Could we apply this system to the electric network when we employ the following changes?
- The high voltage network (big masts) are sparsely connected. Like they are already now.
- The new fluid system is applied to the high voltage network.
- Transformers actually act as transformers between the high and low voltage networks.
- The low voltage network does not rely on fluid dynamics. The consumers get a local "distance penalty" where the power supply will diminish with distance to the closest transformers/generators. Some efficient and relatively simple algorithm that doesn't need to do very time consuming calculations or strives to be a physically correct representation of an electric network but acts a bit similar to how you would expect an electrical network to behave.(*)
- Some more tricks to make it look nice in practice without hurting performance too much.
I am still hoping for a more sane approach to power that would actually make it interesting and challenging to provide the power locally to big consumers. The current system is just too flat for my taste.
*: I like the pragmatic approach you have taken to get performance, pseudo-realism, fun and time constraints under one hood. And I'm feeling that you would be the right person to rethink the electrical network once the fluid system has hopefully proven to be what we hope it to be.
Here's a fun challenge for you:
No power network allowed. If two poles make a wire connection, you have to disconnect them with shift-click. The result is that instead of an electricity network, you now have a sprawling steam pipe network with steam engines and turbines all over your factory. It's much less masochistic than it sounds, trust me. It forces some creative designs and introduces fluid throughput woes as your factory grows (and you'll have to be running steam trains to outposts, yay). Also, steam panels become much less OP and kinda useful for circuit applications.