Draft
Conversation
Our black smoke is a `Thing`-based gas, like all gases were prior to Biotech. This results in noticeable overhead when a large amount of smoke is present on the map, which is further exacerbated by dissipation being proportional to smoke density and thus causing small smoke clouds to take forever to disappear. Sadly there aren't really good options for modded gases these days short of creating a bespoke implementation of our own, but we can nonetheless endeavor to make the current situation better. So: * Increase both minimum spread density and dissipation threshold tenfold so as not to simulate minuscule smoke clouds that all get rendered as "0 PPM" and have no appreciable impact on gameplay. * Apply a minimum dissipation rate of 0.001 / tick so that smoke clouds < 10 PPM still dissipate in a reasonable amount of time (this should hit the 3 PPM dissipation threshold in ~3mins on speed 3). * Use a fixed tick interval of 15 ticks for smoke. * Double the propagation interval for smoke and also double the amount of smoke spewed by fires within this interval to compensate. * Calculate smoke spread to adjacent cells in parallel. * Apply black smoke-related hediffs via a postfix on GasUtility.PawnGasEffectsTickInterval() rather than a per-tick call in Smoke.
|
You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-20647208972.zip |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Reasoning
Our black smoke is a
Thing-based gas, like all gases were prior to Biotech. This results in noticeable overhead when a large amount of smoke is present on the map, which is further exacerbated by dissipation being proportional to smoke density and thus causing small smoke clouds to take forever to disappear. Sadly there aren't really good options for modded gases these days short of creating a bespoke implementation of our own, but we can nonetheless endeavor to make the current situation better.Alternatives
GasGridinto aMapComponentand use that for black smoke mechanics. This actually seems workable, but we'd have little control over dissipation and other functionality without ripping out parts of the code, so the end result would behave quite differently to the current black smoke.Testing
Check tests you have performed:
Savefile: smoke test.rws.zip
Overhead from smoke without these changes:
Overhead from smoke with these changes:

