mesecons icon indicating copy to clipboard operation
mesecons copied to clipboard

Logic gates don't overheat

Open VanessaE opened this issue 4 years ago • 3 comments
trafficstars

All you have to do is connect the output of a NOT gate back to its input, and the circuit will sit there cycling until you break it.

That is, unless you set dedicated_server_step to something ridiculously low, like 0.025 seconds (that is, a quarter of its usual setting of 0.1s). Then, such a circuit will overheat in a few seconds and shut down.

VanessaE avatar Mar 28 '21 06:03 VanessaE

From what I've seen so far, this problem only happens on servers - in singleplayer, logic gates seem to run much faster and overheat like they should.

cheapie avatar Mar 28 '21 06:03 cheapie

A NOT gate where the input is connected should get one heat every 2 steps. Assuming default settings, and a dedicated_server_step of 0.1s: The cooldown time is 20 heat / 2 s = 10 h/s. Heat generation is 1 heat / (2 steps * 0.1 second / step) = 5 h/s.

Server owners should probably change their settings, eg. increase cooldown_time to 8.5 seconds.

Changing the default settings would probably result in overheating circuits, especially in singleplayer.

Imo it would be better if cooldown was in server steps rather than in seconds. It would be much more reliable, and one could build circuits that are guaranteed not to overheat.

Edit: Btw. I've measured the step dtime in singleplayer and it was a ca. 0.050000000745058 seconds if the window is not focused. The shortcut NOT gate didn't overheat with unfocused window. (if window focused, dtime is ca. 0.033 seconds if nothing happens, and ca. 0.016 seconds if gates are active)

Desour avatar Mar 28 '21 20:03 Desour

Imo it would be better if cooldown was in server steps rather than in seconds. It would be much more reliable, and one could build circuits that are guaranteed not to overheat.

LuaC interrupts would also need to be in steps for full reliability.

ridiculously low, like 0.025 seconds

That's only 40 UPS. For comparison, Factorio runs at 60 UPS, with all its complexity. Something... just doesn't feel right.

numberZero avatar Mar 19 '23 11:03 numberZero