Page 1 of 1

[1.1.81] Length of underground belt affects behaviour of inserter at belt entrance

Posted: Sun Apr 16, 2023 2:12 pm
by traycer
I thought I had dug up an old bug I reported way back with 0.15, but this behaviour is different.

In a nutshell: inserting directly into the entrance of an underground belt behaves differently depending on the length of the underground section. Generally, when there is a 0- or 1-tile gap, it inserts as quickly as onto a normal belt. But with a gap of 2 or more tiles, there is a 1-tick delay.

Here's a video demonstrating the problem: https://streamable.com/mld9cw

Vanilla 1.1.80, 64-bit Windows version. No mods, and I wanted to avoid creative mode items in case they were causing some weird interaction.

What's even stranger is that a fresh build of underground belts exhibits different but reproducible behaviour, at least for the first swing (second part of the video). Then it goes back to the usual 1-tick delay for belts with gaps of 2 or more tiles (third part of the video).

Re: [1.1.80] Length of underground belt affects behaviour of inserter at belt entrance

Posted: Sat Apr 22, 2023 3:38 am
by traycer
Reproduced in 1.1.81.

Re: [1.1.81] Length of underground belt affects behaviour of inserter at belt entrance

Posted: Mon Apr 24, 2023 8:53 am
by boskid
Thanks for the report however i am not considering any of the mentioned behaviors to be a bug.

When transport belt connectables (belts, undergrounds, splitters) are built, transport lines are not immediately merged because that is relatively costly operation and belts are often built one after another so the transport lines from multiple entities are merged after some time (there is 0 to 600 ticks random delay).

Similar things happen when inserters are interacting with belts or undergrounds at a position that is in the middle of a merged transport line: because insertions in the middle of a long transport line are expensive, when inserter interacts with a belt at a position that is more than 3 tiles away from the beginning of the transport line, the transport line is split in a way to make sure insertion point is at most 3 tiles away from the inserter (inserter = slow interaction = 3 tiles limit. Side loading is fast interaction that would force 2 tiles limit). So at the beginning the differences are mainly because of the randomized nature of belts remerges causing observable differences of the inserter when it is inserting exactly at the transition between 2 transport lines. That also explains why there is the difference between 0/1 gap underground and other distances: in case of a 0/1 gap underground the transport line is able to be split at a position 3 tiles ahead so the inserter drops items in the middle of a transport line. For longer underground belt distances if the split would happen at the underground exit then the inserter would be inserting more than 3 tiles away from the line front so the transport line is split at the back of the underground line: that means the inserter again drops exactly at the transition between transport lines. Because the item takes 1 tick to enter the underground section, the line for visible part of underground belt entrance activates and deactivates rapidly which also affects inserter behavior as it also has to sleep and be woken up.