Quality combinators calculate multiple times per tick

Ideas that are too old (too many things have changed since) and ones which won't be implemented for certain reasons or if there are obviously better suggestions.
sparr
Smart Inserter
Smart Inserter
Posts: 1444
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Quality combinators calculate multiple times per tick

Post by sparr »

TL;DR
Instead of one operation per tick, quality combinators could run faster.
What ?
Currently every combinator runs one operation per tick. My idea is for combinators with higher than normal quality to run multiple iterations of their assigned operation. Adding a single such combinator would have no effect (unless its own input/output are wired together), but if you put multiple such combinators together you could do more complex calculations faster.
Why ?
The new quality system touches many parts of the game, but ignores combinators, and this seems to do them a disservice. This idea would include them.

It's often difficult to use high-latency circuits; a calculation that takes 10+ ticks to run can be problematic to integrate into a system that needs to make decisions without that delay. This change would allow speeding up time-critical calculations. e.g. my circuit to convert item counts to stack counts (which will be obsolete in 2.0 anyway) takes 7 ticks to run, but could run in 1 tick with this idea.
How ?
There was some concern on Discord that this couldn't be done in a consistent way. This not-pseudo-but-also-not-C++ code might better illustrate the idea in an achievable way:
Now:

Code: Select all

function tick()
    update_all_control_behaviors()
    update_all_circuit_networks()
end
Idea:

Code: Select all

function tick()
    update_all_control_behaviors()
    update_all_circuit_networks()
    for n=1..15 do
        update_legendary_control_behaviors()
        if n%2==0 then update_epic_control_behaviors() end
        if n%4==0 then update_rare_control_behaviors() end
        if n%8==0 then update_uncommon_control_behaviors() end
        update_circuit_networks_connected_to_updated_control_behaviors()
    end
end
PS: boskid already said this was a non starter on Discord, both because the functionality would be obscure and because it would have too high performance impact. I don't expect this suggestion to get implemented, I'm just writing it here for posterity and to reference in another post I'm making next.
Illiander42
Filter Inserter
Filter Inserter
Posts: 521
Joined: Mon Feb 05, 2018 10:01 am
Contact:

Re: Quality combinators calculate multiple times per tick

Post by Illiander42 »

Please no.

Some of us depend on the per-tick behaviour.

Clocks wouldn't work without it, for instance.
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2964
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: Quality combinators calculate multiple times per tick

Post by boskid »

No
Post Reply

Return to “Outdated/Not implemented”