You can have all inserters pick up items first, then move all belts and run assemblers and furnaces and then have all inserters drop items or such. Then your groups would be inserters taking from the same chest or dropping into the same assembler.ptx0 wrote: ↑Mon Sep 27, 2021 3:27 pmit'd be interesting to have the game's entity update loop work on chunk groups that behave as a dependency graph.quinor wrote: ↑Fri Sep 24, 2021 9:16 pm Yeah, that is part of the issue. To really get a lot of performance out of Factorio the engine would have to be designed from scratch in an extremely parallellizable way: kindof cellular-automaton style where state of each object depends only on previous state of a itself and a limited number of neighbours. That also means removing all of the annoying race conditions like two inserters trying to pick up the same object / from the same container and all other things that depend on entity update order. It is possible, but it would likely result in a game that "feels" different in a number of small ways - and it could be that some content would have to be modified or cut.
But I'm pretty sure they have thought of most of that already - as I said, I have a great amount of respect for the team and trust that they are very capable.
chunk groups would be designated during building placement time, based upon a grouping of all other entities this one must be able to interact with, and place it into a thread group.
but if your factory is all interconnected, that's not much help.
While the whole factory interacts that is separated by time. Anything that interacts only next tick is fine. You just have to catch those thing that interact in the same tick.
What you really need to solve is that all inserters behave the same no matter what order you process them in. If you can do that then it's trivial to run them in threads, be that 8 CPU cores or 8000 GPU cores.