shapez.io icon indicating copy to clipboard operation
shapez.io copied to clipboard

Chained Extractors don't always push full output speed

Open PriceChild opened this issue 4 years ago • 15 comments

Reaching the later tiers, I'm finding a few incidences where belts don't always go full speed despite full inputs.

Here's one example, miners:

Screenshot from 2020-10-06 20-24-35

Screenshot from 2020-10-06 20-31-24

(There also seems to be an issue with compact mergers refusing to run full speed, but I can't figure out a reliable repro for that atm.

PriceChild avatar Oct 06 '20 19:10 PriceChild

I notice that the items to the right of the lower reader are slightly spread out, but the items to the left are fine. Is that bottom-left portion stuttering (stop, start, stop, etc)? Might be the fault of the belt reader, though I am not sure.

You could also split the belt and read each sub-belt's speed to make sure the reader doesn't influence anything.

EmeraldBlock avatar Oct 06 '20 19:10 EmeraldBlock

Removing the extractor on the far right of the top or bottom rows in the top example slows the reader down to 12.

For this reason I don't believe it is the reader's fault.

PriceChild avatar Oct 06 '20 19:10 PriceChild

Using your upgrade levels, I chained 5 extractors and sent their output through a reader. This got me a rate of 12. However, by using balancers to split the belt, read each, and remerge, I got measurements of 7 and 7.

Try it yourself, I honestly don't know the cause.

EmeraldBlock avatar Oct 06 '20 19:10 EmeraldBlock

image ~~okay what~~ nevermind, it went down

EmeraldBlock avatar Oct 06 '20 19:10 EmeraldBlock

Okay, some data using each framerate (rows of 5 chain extractors feeding into 3 belts -> reader -> 5 belts -> trash): 30 -> 10 and 14 (chaining an extractor on one row sent all the 14s to 10) 60 -> 12 120 -> 14 180 -> 13.9 240 -> 14 this is weird

EmeraldBlock avatar Oct 06 '20 19:10 EmeraldBlock

This is probably caused by the same thing as #748, it seems when the tick rate is set to 60Hz the reader causes belts to cap at 12. If the belt is running faster than that then you add a reader it slowly drops to 12. Increasing the tick rate seems to fix the issue.

TastyPi avatar Oct 06 '20 23:10 TastyPi

I can't reproduce at 120Hz.

PriceChild avatar Oct 08 '20 10:10 PriceChild

For me the problem is the x7 speed, at that speed weird thing started happening (I have 60 Hz). For x6 everything was fine. I have every upgrades at x7 speed, the tunnel provides red color from 5 extractors, in theory giving 14 elements per second. After deleting and adding extractors again, it jumps near 14 (good): image but after some time, around 1 or 2 minutes, it goes down to 12 (bad), even though it should be maxed out, because of the almost empty storage: image

Not only extractors were slowing down, other buildings too, e.g. color mixer.

pepkin88 avatar Oct 11 '20 12:10 pepkin88

I'm having the same problem, followed by this weird bug, it might help, but i'm still confused grafik The values aren't locked, they are moving up and down by .2 or .3 sometimes, but inconsitently.

Julius971 avatar Oct 12 '20 17:10 Julius971

I don't think it's the belt reader either. I'm at much higher levels, running at 60Hz tick rate (big factory, tick time is 12-13ms). Everything is limited to 20 / s, when it should be already 23.4: (I added the top extractors simultaneous via paste to start everything at the same time) image Increasing tick rate to 120Hz seems to help for a while (for these simple examples probably for a long while), but at least my big factories slow down back to 20 /s after a few minutes (I double-checked, there is nothing in there that limits throughput to 20/s).

Draradech avatar Oct 21 '20 16:10 Draradech

shapezio_2020-10-24_16-18-27

From Tier 8 and up belts seem to get capped at 15 after running a while. (I'm currently on Tier 20). On Tier 7 it capped at 12 for me as well.

Running at 60Hz

noctilucentgames avatar Oct 24 '20 14:10 noctilucentgames

I did a lot of testing on this bug, and can give some information as to when it occurs.

This is not a bug with the belt reader or with any component specifically. It applies to all components which receive a full belt through one input: Balancer, Compact Merger, Compact Splitter, Tunnel, Rotator, Belt Reader, Filter, Storage*

  • I am assuming it would apply to storages as well, but usually it will not due to when it triggers.

At most levels, this will trigger whenever a machine listed above receiving a full belt gets backed up / blocked and can no longer process items. When this happens, the machine gets "limited" and once it returns to having items flow through freely, they will be unable to flow at the maximum belt rate and will instead only flow at the "resonant rate" (relating to the tickspeed, as others have found). If the belt has more items on it than this, which is likely, the belt before this machine will flow at a slower speed and this can cascade through the whole machine. Letting items stop flowing through the machine for a little bit will stop the machine from being "limited" and it will go back to normal, this can happen by clearing out a single belt before the machine, clearing the entire factory, or often by reloading the game (which destroys items inside machines).

A very interesting observation I made is that, at least with 16 item per second belts, the above only ever happens when there are 3 or more belts between this machine and the previous machine. When there are 2 or fewer belts, no matter how many times the machine starts and stops, it will keep flowing at the full item speed. image With this information, you can build your factories in a way to prevent this, by breaking up your belts with tunnels, mergers, or belt readers every 3 blocks. If you don't want to do this for all belts, using a storage with a trash can function as an "overflow gate" which will never get limited itself since it couldn't ever be backed up, and if you place it before a machine there will be fewer than 3 belts and it will prevent any limits on that machine's speed as well.

Things that could be further tested are the effects at different levels, especially higher upgrade levels. At levels below the "freeplay upgrades" this is all true but I have heard some people with higher belt speeds have noticed that bugs like this are happening more commonly without some criteria having to be checked off. For example, one person with around 21.75 items per second on their belts had every single machine capped to 20 items per second, even when there was no overflow and no belts of 3 or longer.

My theory on what causes this is that it's some kind of "misalignment" between the positions of items going into an out of a machine and the "resonant rate" of the tickspeed. Every time things get capped via this bug, it's always to a particular rate which is an even divisor of the tickspeed. 12, 15, 20 items per second all share this property for 60fps. When machines are flowing items through normally, they are aligned by whatever machine is producing them so they should always be spaced out at an interval related to the max belt speed. But when a machine gets backed up, items stop such that the front item of the belt is at the input of the machine, and perhaps this could create a "misalignment" in the belt at the previous machine, where things are no longer lined up at the proper rate. Perhaps this misalignment persists even after the backup has been cleared due to the tickrate of the game not matching up properly? This is all just a theory and I don't know exactly how this stuff is implemented but my guess is that the bug is something along those lines.

Hope this helps!

electraminer avatar Oct 28 '20 03:10 electraminer

Guessing this might've been fixed in 1.2.2? Will have a look.

PriceChild avatar Dec 07 '20 23:12 PriceChild

As an expansion on this bug, it's entirely tick based. It can also affect belts themselves, but has a different impact than on the buildings mentioned. image

Alex-x90 avatar Oct 21 '21 21:10 Alex-x90

@ 240Hz image

Seems stable @ 60Hz image

My upgrades: image

Version: 1.5.5. @ prod @ 400ee8e7 Roughly 10 FPS on my machine

Interestingly enough, I also found some "interruptions" the extractions when I deleted some unrelated extractors that were above the ones displayed. These also give a rather interesting pattern. Plus, even if it says it's capped at 5, I guess depending on the level, it gives a slightly higher output if you stack 6 extractors.

image

TyIsI avatar Mar 10 '24 03:03 TyIsI