You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Easy option: remember the tick when the monitor entity got placed and use placed_tick % sample_frequency_ticks as the key (spreads things semi-randomly, but probably sufficiently).
Trickier option: keep a bunch of buckets and divide round-robin into those buckets -- but they'll get uneven when removing monitor entities. Maybe load-emptiest-first? They still get uneven, but they get better when you add more.
Better yet: we're keeping a list of combis anyway -- just iterate that over multiple ticks, like the YARM ore reader (retaining the iterator between ticks). Possible difficulties:
when fewer than signal_update_frequency monitors, we need to skip everything that's been updated more recently
when more than signal_update_frequency monitors, we need to update more than one monitor at a time
(possible simplification opportunity: always iterate 4 combis every tick and don't allow the player to place more than 1200 combis)
(in fact, setting a maximum number of combis may be a good idea regardless, since both reading signals and storing them gets nontrivial as you add more and more)
The text was updated successfully, but these errors were encountered:
Easy option: remember the tick when the monitor entity got placed and use
placed_tick % sample_frequency_ticks
as the key (spreads things semi-randomly, but probably sufficiently).Trickier option: keep a bunch of buckets and divide round-robin into those buckets -- but they'll get uneven when removing monitor entities. Maybe load-emptiest-first? They still get uneven, but they get better when you add more.
Better yet: we're keeping a list of combis anyway -- just iterate that over multiple ticks, like the YARM ore reader (retaining the iterator between ticks). Possible difficulties:
signal_update_frequency
monitors, we need to skip everything that's been updated more recentlysignal_update_frequency
monitors, we need to update more than one monitor at a time(possible simplification opportunity: always iterate 4 combis every tick and don't allow the player to place more than 1200 combis)
(in fact, setting a maximum number of combis may be a good idea regardless, since both reading signals and storing them gets nontrivial as you add more and more)
The text was updated successfully, but these errors were encountered: