Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logic gates don't overheat #561

Open
VanessaE opened this issue Mar 28, 2021 · 3 comments
Open

Logic gates don't overheat #561

VanessaE opened this issue Mar 28, 2021 · 3 comments

Comments

@VanessaE
Copy link

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.

@cheapie
Copy link
Contributor

cheapie commented Mar 28, 2021

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.

@Desour
Copy link
Contributor

Desour commented Mar 28, 2021

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)

@numberZero
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants