3 ms·
It's actually the result of this optimization -- since compacted items don't shift, a fully compacted belt will not move, even if the full compaction is in a ci
by freeone3000 5y ago
It's actually the result of this optimization -- since compacted items don't shift, a fully compacted belt will not move, even if the full compaction is in a circle.
- pubby 5y agoI still confused about your point. The segment optimization reduces the number of nodes being iterated over, but doesn't change much else. A fully compacted belt can move in Factorio, but only when Factorio knows it can output into an open belt. You can have a whole chain of fully compacted belts move, so long as the last segment has an opening. This is handled just like the first algorithm in OP - moving one segment per iteration like a big caterpillar walking. A loop is just a segment that outputs into its own input - it has a seam. Factorio can't move the belt because it doesn't see an open space. But one could still use the second algorithm, marking segments as immobile rather than tiles. This allows the loop to work without jamming, even with the optimization.
- freeone3000 5y agoThere isn't any seam once the belt is fully compacted. This saves a check per full belt per tick -- this adds up.