Page 1 of 1

Replace Belts with Undergroundbelt

Posted: Wed Oct 12, 2016 10:46 am
by LoggerM
It would be great, if we could replace a Belt with an Underground-Belt, just like replaceing a yellow with a red one.

When crossing two Belts or a Train-track with a Belt we have to delete up to 4 pieces in a realy slow time. So it would be great if we just replace the first and last one with an underground Belt.

Same with Splitter.

Re: Replace Belts with Undergroundbelt

Posted: Wed Oct 12, 2016 11:15 am
by Deadly-Bagel
With steel pickaxe it's not too bad but I know what you mean. Still, it's not as simple as an entity swap as you also have to replace everything in between, which could potentially cause problems (consider if it is crossing over a separate belt in the same direction or something).

Re: Replace Belts with Undergroundbelt

Posted: Thu Oct 13, 2016 10:37 am
by LoggerM
I dont have to replace all thats corssing.
Just replace the first and the last tiles (the in- and outcoming ones) would be great.

Re: Replace Belts with Undergroundbelt

Posted: Thu Oct 13, 2016 11:22 am
by bobucles
It's pretty cool that underground belts can be used to reduce CPU consumption in a meaningful way. Part of the reason why it works is because the intermediate belt segments can't be interacted with. No interaction means no CPU cycles to use. But wouldn't it be better to try passing on these CPU savings to regular belts? There are plenty of belt segments that have no inserters or interaction points along their length. Bots can't grab off a belt and items dropping on a belt are a rare occurrence. Unless a player interacts directly with the belt, there's no reason to suspect that they'd have any more interaction than an underground belt. So shouldn't it be possible to pass on the CPU savings in a similar way?

I am by no means suggesting that this is an easy problem to solve. But if underground belts can do it, there must be a way to trick regular belts to do it too.

Re: Replace Belts with Undergroundbelt

Posted: Thu Oct 13, 2016 11:30 am
by daniel34
bobucles wrote:It's pretty cool that underground belts can be used to reduce CPU consumption in a meaningful way. Part of the reason why it works is because the intermediate belt segments can't be interacted with. No interaction means no CPU cycles to use. But wouldn't it be better to try passing on these CPU savings to regular belts? There are plenty of belt segments that have no inserters or interaction points along their length. Bots can't grab off a belt and items dropping on a belt are a rare occurrence. Unless a player interacts directly with the belt, there's no reason to suspect that they'd have any more interaction than an underground belt. So shouldn't it be possible to pass on the CPU savings in a similar way?

I am by no means suggesting that this is an easy problem to solve. But if underground belts can do it, there must be a way to trick regular belts to do it too.
This was originally planned for 0.14 but will hopefully come in 0.15:
Friday Facts #148 - Optimizations for 0.14
The belt/pipe lines would be merged and act as series of segments. This allows the items on the segment to be saved in one continuous piece of memory, which not only improves memory locality, but allows us to use tricks to move the items on the belts smarter, instead of moving every item in the segment, we can just change the overall segment offset as long as the belt exit is not blocked. On top of that, the individual belts and pipes wouldn't have to be updated, as their animation can be simply tick-based. In the ideal case, this could improve the performance of transport belts many times!

Re: Replace Belts with Undergroundbelt

Posted: Fri Oct 14, 2016 11:22 am
by bobucles
I wish them the best of luck figuring it all out. I imagine the hardest part may be dealing with the huge belt walls used as "biter traps" and 'artifact collectors'. It's an unusual way to use belts that both requires a ton of them and forces unpredictable interactions where stuff falls on random belt segments.