0.7.3.3 Crafting with lots of silos causes stutter

Zed

Well-Known Member
Dec 23, 2016
1,256
1,188
515
40
Found this while testing my new UltiCrafter, seems like the flashing on crafting blocks causes small freezes.

To reproduce:
1. Make a large base with lots of crafting blocks. (Or use the only in this thread)
2. Try to Craft a block.
3. Every time the blocks flash there should be a small freeze.

As allways, if you need more info then please ask. ;)
In 0.7.5.3 I experience a slightly different issue when performing step 2 with the UltiCrafter by @Zargn ; specifically upon requesting a block to be crafted a delay of approximately 3 or 4 seconds immediately occurs (@18Fps) after which it behaves "normally" Except that not ALL of the silo's logistically connected to the fabricator seem to respond to "pings" from the fabricator.



By Comparison the "Test Ts 4" by @Mr-Vagabond does not experience this initial slowdown upon requesting a block from a fabricator and seems to activate all silo's connected to the fabricator via conveyor belts.



My theory is that the initial pause prior to accepting the fabricate command by @Zargn Ulti base is probably being caused due to the Fabricator AI somehow not seeing all silos despite being connected via conveyor belts. Perhaps an element of the nested pathfinding or exceeding a maximum number of pinged silos which the Test Ts 4 avoids by separating some of the silos from the fabricator lane by using filter conveyors thus preventing them from being "seen" by the fabricator during the initial resource call spool up once a player requests the fabrication of a block.
 

Mr-Vagabond

Well-Known Member
Dec 21, 2015
188
117
445
23
So, with what @Zed say, this is not exactly the silo the problem, it seen that this is the number of silo for one conveyor line no ? I have another design with a lot of silo in the same way of @Zargn ( with long conveyor line ), do you want it to test it out ?
 
  • Like
Reactions: Zed

Zed

Well-Known Member
Dec 23, 2016
1,256
1,188
515
40
So, with what @Zed say, this is not exactly the silo the problem, it seen that this is the number of silo for one conveyor line no ? I have another design with a lot of silo in the same way of @Zargn ( with long conveyor line ), do you want it to test it out ?
I agree with you that it is most likely the number of silos that @Zargn used in Ulti base. The Refinery seems to wish to only see a certain number, and beyond that number it will pause for a moment deciding which silos to see to the refinery's maximum number of silos when a fabrication request is made.

I like all bases and would be happy to look over any you wish to create @Mr-Vagabond ; currently the smallest fully functional base I could design is 10x10
 

ZeroGravitas

Breaker of Games
Jun 29, 2017
3,938
5,756
675
37
UK
www.youtube.com
Also does it when you add or remove blocks, while crafting.
And here's @Tenzen gaming running into this a couple days ago in his latest YouTube TerraTech series - skip to 9m20s:

I'm bumping this thread because, yeah, it's kind frustrating that crafting is still broken in many ways and people continuing to run into these bugs makes them topical. But also...

I'm wondering if there will be a quick fix for the long hangs when changing a non-crafting-block part of a tech that has crafting in progress...?

I mean, optimising the crafting AI is obviously a very involved job, for after multi-player (if that remains the priority), but I don't see why the game apparently needs to re-evaluate the crafting route when no conveyors, etc, have been changed. Maybe there was an oversight here and a fairly simple switch statement can save a whole lot of unnecessary computation...? @Django, @higekun, @TheFuntastic ? (Sorry, I don't know who of the coders would be most appropriate, probably someone I've not seen on the forum...?)

Also, it looks like the hang isn't specific to number of silos, per say (TenZen only has 5 connected, only 2 with resources, and still very frustrating hangs). Probably more the component factories, with a combinatorial explosion of scheduling options to look at, particularly in the advised loop configuration. (I may have another poke myself...)
 
  • Like
Reactions: Zed

Zed

Well-Known Member
Dec 23, 2016
1,256
1,188
515
40
And here's @Tenzen gaming running into this a couple days ago in his latest YouTube TerraTech series - skip to 9m20s:

I'm bumping this thread because, yeah, it's kind frustrating that crafting is still broken in many ways and people continuing to run into these bugs makes them topical. But also...

I'm wondering if there will be a quick fix for the long hangs when changing a non-crafting-block part of a tech that has crafting in progress...?


Probably not; since such a fundamental change of how a tech is registered and "built" off of its own "grid" within Unity would make it nightmarish (at the very least) to change the fundamental "checks" from an entire tech to specific block [ID]s upon a specific tech which could in of itself create additional lag. Since, by my understanding, each tech essentially is a numerical matrix containing the information of how each tech is formed via the lattice of anchor points holding one another; probably in the order in which they were placed upon the tech from the playercab / anchor block which generated the new Entity[Tech] entry. If that were to change it would impact the fundamental game experience at so many levels I would not even attempt to list them.

I mean, optimising the crafting AI is obviously a very involved job, for after multi-player (if that remains the priority), but I don't see why the game apparently needs to re-evaluate the crafting route when no conveyors, etc, have been changed. Maybe there was an oversight here and a fairly simple switch statement can save a whole lot of unnecessary computation...? @Django, @higekun, @TheFuntastic ? (Sorry, I don't know who of the coders would be most appropriate, probably someone I've not seen on the forum...?)
Given the shift in gameplay from buying / selling blocks toward crafting them I and probably others would contend that improvements of crafting in general is just as important as multiplayer in enhancing the overall TerraTech Experience. A crafting base (Fabrication Tech) while attempting to craft a block is very susceptible to micropauses since the tech is already "using" its blocks (theorized above) so attempting to add another block entry to the tech's matrix would cause a pause of the fabrication procedure while the extra block is placed upon it and then another pause for the Crafting AI to see whether or not the change impacts the current fabrication request. A staff list is available here. That said, with cutting edge consumer hardware these types of "micropauses" are far less noticeable.

Also, it looks like the hang isn't specific to number of silos, per say (TenZen only has 5 connected, only 2 with resources, and still very frustrating hangs). Probably more the component factories, with a combinatorial explosion of scheduling options to look at, particularly in the advised loop configuration. (I may have another poke myself...)
The Crafting AI seems to be very sequential in the execution of its order of operations; all the way down to filter conveyor blocks seeming to consistently pick blocks to move based on their Resource[ID] value while set to "everything" which in of itself is somewhat symptomatic of just how sequential the Crafting AI (NetOps) is... An easy example of this would be my Prototype Quad Fabricator mentioned here.
 

Epb7304

Exploring Better Future
Nov 24, 2017
106
103
430
whenever I place any form of conveyor on my build which has around 100 conveyors already. it lags for a good second or two, please fix...
P.S. I'm using the latest unstable version ,whichever that one is...

-edit: It seems to happen whenever I place any blocks on my base... seems to be a size thing...
 
Last edited:
  • Like
Reactions: Seth_Seth

ZeroGravitas

Breaker of Games
Jun 29, 2017
3,938
5,756
675
37
UK
www.youtube.com
I've merged @Epb7304's new thread, titled "Lag, Lag" with this older thread on the same topic.

This issue occurs when you have Fabrication active, so if you cancel all crafting that should let you edit the tech freely.

It happens when the game is revaluating the conveyor network and there are a lot of crafting blocks on it (mostly Component Factories or Refiners), especially if they are part of a loop because it increases the total combinations of possible routes that can be taken.

If you have any other crafting curiosities, see my complete guide.
 

Cannochi

Member
Dec 30, 2019
2
3
14
I know this is a super old thread, but it is one of the first ones that popped up when I googled this problem, and I believe I have found a solution for others that may follow.

For me, my base was freezing everytime I placed or took off new blocks because I had a fully connected circular conveyor belt loop with a dozen storages, multiple refineries, etc. you name it attached.

The fix was literally to just chop off a few conveyor belts, and add a dropper on the end of the conveyor belt, and a resource receiver at the beginning.

In this way, you can still have your fully circular conveyor belt, but for whatever reason, however the game calculates the conveyor belts, it likes this strategy a lot better.
 

harpo99999

Ah kick till it starts
Aug 14, 2014
2,216
1,128
570
australia
cannochi, another 'trick' that I use is a universal filter after the fabs re-directing the resources/components back to an input line for the silos
 
  • Like
Reactions: Cannochi