Gas overlay varied sprites - #38855
Conversation
Can you test scrubbing out the gases to see if the overlays are cleared properly? |
|
image example...? |
|
why not apply this to cryotheum, too? |
i was thinking it wouldn't be as common in rounds, and it would've meant making 6 different icon states as a workaround for not being able to frame offset them, but if you insist |
|
This is adding multiple overlays to each turf which is going to add up when we get a plasmaflood. Instead, why not look at how snow overlays work and use that approach? You can create 3 plasma vis masters in nullspace then just add them to the vis_contents of each turf |
|
gas doesnt have enough motion to account for the busy overlay image, this would look a lot better with a couple new sprites |
|
You could also gain a lot of extra mileage by offsetting the "starting" time for the overlay, so they're unsync'd. |
it felt bad enough to do it with sprite states already, i wish BYOND just had a way to offset them |
|
according to @DeityLink, what you can do is give the gas overlay sprites directions, and have each direction be its own offset, then spawn the overlay with a random direction |
actually that is pretty efficient, but the end result would still be pick() ing an overlay to vis_contents |
|
Test this again but make a 500x500 map to test it on. And, y'know, measure FPS / pay close attention to the profiler. |
|
If I can give an opinion, those overlays should be completely replaced with particles. It'd look better AND use less CPU server side. |
The server cost of displaying four icon states is FAR less than the client cost of spawning multiple particle sets per turf. |
This would be true on any proper engine except ours, byond is a cesspool that we've gotten good at swimming through, but it's still a cesspool. |
Except only turfs that are on your screen would matter anymore. Post-NarSie has rune particles on every space turfs and it works fine. So does the "holy fire" |
|
That might be true, worth a test I guess. |
|
back in draft for some performance coding |
had a look at the profiler, update_graphic() seems to only use 0.8 self cpu and then isn't called again after the gases get their sprites added. (done from adding plasma to all simturfs with SDQL, so this is an extreme case) |
|
To be clear, update_graphic is only called if necessary, not every tick, right? In that case, it's hard to imagine a performance impact at a significant level, even in very large rooms like atmos |
only when necessary it seems, as the profiler confirms (it doesn't show up at all on stop-refresh) |
|
In that case I see no serious concerns in this implementation. We can keep an eye on it. |


[sprites]
2026-01-05.23-27-52.mp4
What this does
Allows gas overlays to pick from a set of overlays instead of just use one. Currently only used with frame offsets. (would be nice to be able to manipulate this directly on the icon but BYOND won't let me)
Why it's good
Less of each tile's gas overlay looking the exact same.
How it was tested
Opening a plasma, cryotheum and N2O canister in test_very_tiny while separating the room into two halves by windows, then breaking the windows, adding new tiles outside the room with manual building and buildmode, letting the gas drain.
Changelog
🆑