[FFF 260] Pipe junctions should merge, for reduced calculations

Post your ideas and suggestions how to improve the game.
Post Reply
Hexicube
Fast Inserter
Fast Inserter
Posts: 174
Joined: Wed Feb 24, 2016 9:50 pm

[FFF 260] Pipe junctions should merge, for reduced calculations

Post by Hexicube » Sun Sep 16, 2018 2:47 pm

In the most recent FFF the new proposed system is effectively turning the entire pipe network into single pipe segments connected with junctions. This is an improvement in theory, but it mentions junctions would be a little more CPU intensive...and then it shows the last image:

Image

This reminds me of what I see as a typical oil refinery layout:

Image

Assuming that underground pipes are considered to be a single segment, that layout boils down to 5 sets of this:

Image

One thing becomes immediately apparent, which is that there's going to be tons of junctions in extremely close proximity. Since junctions are going to be the intensive part of the new pipe system, I see a (relatively) simple solution to the problem: Combine junctions.

For the last image, instead of having eight 3-way junctions, what if it was two 6-way junctions? All of a sudden, 75% of the junctions are gone, and it's went from 24 connections to 12. Assuming this merging only happens on pipe additions/removals to that pipe network, it should in theory massively improve the performance of the system that is being proposed, at the cost of a CPU hit when modifying pipe networks as it tries to work out how to merge junctions nicely.

For the image at the end of FFF 260, it would go from three junctions (3+3+4 way) to one 6-way, going from 10 connections to 6. Not as much of an improvement, but that's a theoretical scenario when my realistic example has a far bigger benefit. One way to look at it, is that every merger removes one junction and two connections.

The problem I foresee is save-load stability, since it would be horribly inefficient to break apart all junctions and remake them on a single pipe addition. Other than that, I can't see this addition performing worse than the current proposition in FFF 260, since pipe networks are typically left alone.

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 1331
Joined: Thu Nov 20, 2014 11:11 pm

Re: [FFF 260] Pipe junctions should merge, for reduced calculations

Post by darkfrei » Sun Sep 16, 2018 3:00 pm

It looks like a logically optimization, only one junction instead of three.
Junction_01.png
Junction_01.png (123.22 KiB) Viewed 52 times

Post Reply

Return to “Ideas and Suggestions”