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

Add atmos time compression #21954

Merged
merged 4 commits into from
Dec 11, 2023

Conversation

Partmedia
Copy link
Contributor

@Partmedia Partmedia commented Nov 28, 2023

About the PR

Add atmos.speedup which is effectively a atmos-only time compression CVar. This adjusts heat capacities and transfer rates to effectively globally speed up the time constants of atmos.

This allows faster response to heating/cooling changes and faster cleanups (by buffing scrubbers, pumps, and everything else) that is tunable through one global time compression CVar. It also achieves this without any thermodynamic unsoundness.

And if anyone complains, this number can be increased/decreased as needed without fear of breaking anything.

Why / Balance

Multiple people complained that atmos is too slow/not useful/not fun.

Atmos variables were balanced based on real specific heat capacities and semi-realistic transfer rates. However, things typically happen too slowly in real life for people to feel like they're having fun in a game. See: space-wizards/docs#78

It is also not okay to globally buff all numbers, because:

  • That breaks thermodynamics, leading to infinite power via the TEG (and other inconsistencies)
  • Every time you go buff all the numbers there is an incredible amount unnecessary repository churn
  • It is easy to buff one number and forget to buff all the related numbers

Technical details

  • Adds a atmos.speedup CVar. It is used in two ways:

    • As a divisor to the Atmospherics heat capacity function to calculate heat capacity. Setting this to 1 is a "no-op". Setting this to something greater than 1 globally reduces heat capacity, which makes heating/cooling happen faster without breaking thermodynamics. All atmos reactions have their heat output scaled by this same rate to keep the time constant for reactions (e.g. plasma fires) as before so that fires don't burn hotter, because people want all the benefits of time compression without the disadvantages.
    • Multiplies transfer rates by sqrt(atmos.speedup) (via the new AtmosphereSystem.PumpSpeedup() function)
  • Teach all the atmos devices that used MaxTransferRate (or derived variables) to multiply by the new PumpSpeedup().

Media

Atmos techs who respond to a gas leak by turning on widenet can now fix problems in a reasonable amount of time. Note that things are still kind of slow if you don't send an atmos tech to go deal with the problem.

out-2023-11-28_11.16.56.mp4
  • I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Breaking changes

None

Changelog
🆑 notafet

  • tweak: Pumps, vents, scrubbers, and heaters now work faster.

Add atmos.speedup which is effectively a atmos-only time compression
CVar. This adjusts heat capacities and transfer rates to effectively
globally speed up the time constants of atmos.

This allows faster response to heating/cooling changes and faster
cleanups (by buffing scrubbers, pumps, and everything else) that is
tunable through one global time compression CVar.

It also achieves this without any thermodynamic unsoundness.
People want all the benefits of time compression without the downsides.
Content.Server/Atmos/Reactions/TritiumFireReaction.cs Outdated Show resolved Hide resolved
Content.Shared/CCVar/CCVars.cs Show resolved Hide resolved
@deltanedas
Copy link
Contributor

turning on widenet 

air alarms do this automatically

@Partmedia Partmedia added the S: DO NOT MERGE Status: Open item that should NOT be merged. DNM. Allows test to run unlike draft. label Dec 11, 2023
@Partmedia
Copy link
Contributor Author

Adding do not merge for now since this also makes producing frezon way too fast.

@deltanedas
Copy link
Contributor

just make spacing fast again

@Partmedia Partmedia mentioned this pull request Dec 11, 2023
1 task
@Partmedia Partmedia removed the S: DO NOT MERGE Status: Open item that should NOT be merged. DNM. Allows test to run unlike draft. label Dec 11, 2023
@Partmedia
Copy link
Contributor Author

Since frezon prices were just set to zero, and since there are a few frezon adjustments in the pipeline, I plan to merge this soon. If there is too much fallout the atmos.speedup CVar can be tweaked anywhere between 1–64.

@Partmedia Partmedia merged commit a2ed25a into space-wizards:master Dec 11, 2023
10 checks passed
@Partmedia Partmedia deleted the notafet/atmos_speedup branch December 12, 2023 00:11
@comasqw
Copy link

comasqw commented Dec 12, 2023

image ?

BasedUser pushed a commit to BasedUser/space-station-14 that referenced this pull request Dec 16, 2023
Add atmos.speedup which is effectively a atmos-only time compression
CVar. This adjusts heat capacities and transfer rates to effectively
globally speed up the time constants of atmos.

This allows faster response to heating/cooling changes and faster
cleanups (by buffing scrubbers, pumps, and everything else) that is
tunable through one global time compression CVar.

It also achieves this without any thermodynamic unsoundness.
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

Successfully merging this pull request may close these issues.

4 participants