shapez 2

shapez 2

Not enough ratings
Fix jam from longer belt
By elidoran
Fix belt jams using a simple beltstream trick. Updated 2025/01/19
   
Award
Favorite
Favorited
Unfavorite
TLDR
pause game, delete exits, select all buildings, clear with "I" hotkey, unpause, let it fill up, find bad gaps, fill gaps by deleting shapes on paired belt by placing a belt overtop the shapes to delete, pause game, restore exits, unpause game. It runs smoothly from then on.
Preface
There are a few tricks to help before getting to the one I show in this guide. They are:

  1. Select the whole factory from its inputs to its outputs and press the clear hotkey, I. The fresh start will clear up some issues which were caused during the building or editing with shapes in it.
  2. click on both input and output belts to see their current speed to ensure we know what it's really doing. It may take some time for the result to normalize on a value, so, don't think the first value you see is the real value, wait a bit. Or, place some belt readers (tho, I find they're not always as accurate as clicking on the belt).

Also, the below solution to different belt lengths applies wherever the two belts are affecting interconnected buildings where one belt's progress will cause the other to become stuck. It could be a forward problem or a backward problem.

A simple way to look at this is with just the two belts. If different lengths cause the long belt to "get behind", then pre-load it with shapes as I describe in this solution, which cause it to "catch up". If the belts were the same length and we pre-loaded one, then that one would be "ahead". So, we use that to help a long one to "catch up".

Something similar is when two belts are the same length and one has more and it's causing problems. The solution is to simply use placing a belt to delete some of its shapes to bring them back into balance so one is no longer "ahead" of the other.

These are both simple belt management. Once done the area continues to work correctly without having to do anything.
Belts are Buffers
Each belt tile is a small buffer. So, running multiple in a row is a dense buffer while using jumps repeatedly spreads the buffer out over the distance for less buffer per tile traveled.

That's why shapes will travel faster along a series of jumps than a belt covering the same distance: the shapes have to fill the buffer as they go along and there's less buffer with jumps.

Sometimes using jumps can help one belt by moving its shapes faster over distance.
The Solution
When input/output belts are different lengths the time it takes for shapes to get to the next building on the long belt can cause a stall which cascades back to earlier buildings. This can then cause more problems even farther back.

This causes it to become completely stuck, or for the work to happen in bursts. While the buildings are jammed, some shapes pack together waiting. Then, when the first shape on the long route finally arrives, it starts a quick series of processing until the delay (from a new gap) happens once again, and it is backed up again.

This example shows one version of the problem and how to solve it simply with a little initial setup.

My example has two very long belt loops to show this problem and solution. It's not a real thing we'd build like that. Its length is extreme to help show the example.

The first screenshot shows I have the inputs already there waiting to enter both groups.

.

The second screenshot shows the input belts are running at full speed, but both groups' top side are stuck waiting on a shape from the long route.

.

The third screenshot shows the speeds near the trashes are half-speed because only half the buildings were working.

.

The fourth screenshot shows all the buildings are stuck waiting for the shapes on the long routes. They're almost there and we can see a gap has started in the long routes. So, even when the shapes finally arrive, there will soon be another stall caused by that gap.

.

The fifth screenshot shows the shapes finally arrive. They start a burst of work until the next gap. The speed dips because there hasn't been shapes for a while.

.

The sixth screenshot shows the speed goes back to full speed, but only until the next gap causes the next stall.

.

The seventh screenshot shows how to fix this. I am only fixing the bottom group to compare the two later.

.

What to do to fix this:

  1. First, delete the last belt of the long route, right before the building it's going into.
  2. Then, select that building.
  3. Now, press the clear hotkey, "I", to cause that building to clear its other side and allow all the other buildings to move forward.
  4. Repeat the clear until there are "enough" shapes in the long route; read below
  5. Replace the removed belt tile

It doesn't require filling the entire long route. We only need enough so there's always shapes waiting at the building fed by the long route. Then, it's never delayed because there's always a shape ready to go in immediately, at each tick, like all the other buildings.

If it turns out there still isn't enough, then repeat the steps to put more in.

The eighth and final screenshot shows the bottom group running at full speed while the top group runs into the delay problem again.


I've done this many times and had it continue to work at full speed from then on.
Example Blueprint
This is a blueprint of the example I used. It's 640 BP. I didn't include the 2x2 platform in the blueprint so you can place it on a 3x3 or whatever, or just part of it on something smaller.

SHAPEZ2-1-H4sIAAoN7mYA/6xaW2vbMBT+L2KPDkwX25mhD0u7srKUdWkIG6MPolFbg7GD4rSUkP8+Z7nUTnyRPjmBhOB8Oufo3D4de01mJKKfv/geGd2RaE0+5e8LRSIyWsXJPE6fiUduHrN0e+lK5pJEf0lc/I4O15fES1dJsvsgyxe5UNHlavcmDxuPfEtzHatlAVyT3yQaUOaRP8V36JEJiYof0600leRX6kmuknysnvKbNFc6lclM6limOdl4eyzdYfkH6i7T+b1K50qfgjxyWfznx9f/r4uzNXyXNdhxjcIGulvpf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