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

Ports shared particle holders #5163

Merged
merged 4 commits into from
Feb 4, 2025

Conversation

Absolucy
Copy link
Member

@Absolucy Absolucy commented Jan 29, 2025

About The Pull Request

Ports tgstation/tgstation#87892

Implements a shared holder particle system, somewhat inspired by Baystation12/Baystation12#34014 (thanks Kapu). Atoms can be assigned "shared" particles via add_shared_particles, with an optional "alternate" key passed as a second arg if you're planning to edit the returned particle holder (for example, color it like slimed status does). Removing is done via remove_shared_particles with an option to delete the shared holder if nothing is using it anymore (on by default). This system should be prioritized over normal particle holders when a lot of entities would be using a certain particle effect (like fires) as it conserves a lot of clientside performance.

Why It's Good For The Game

Less clientside lag.

Changelog

🆑 Absolucy, SmArtKar
refactor: Various status effects and objects now use a new "shared" particles system, which should considerably improve client performance when encountering entities with a lot of particle effects.
/:cl:

@Absolucy Absolucy added do not merge don't merge this ffs Performance / Optimization the number going down makes me happy :3 labels Jan 29, 2025
@SmArtKar
Copy link
Contributor

You probably want tgstation/tgstation#88048, tgstation/tgstation#88114 and tgstation/tgstation#88111 too while you're at it

@Absolucy
Copy link
Member Author

@SmArtKar i kinda just ctrl+f'd through our code for particle usage, rather than cherry-picking the followups, as we seemingly haven't ported some of the previous stuff that added particles to stuff

This was referenced Feb 1, 2025
@Absolucy Absolucy removed the do not merge don't merge this ffs label Feb 4, 2025
@Absolucy Absolucy merged commit e932453 into Monkestation:master Feb 4, 2025
25 checks passed
@Absolucy Absolucy deleted the particle-pooling branch February 4, 2025 03:31
github-actions bot added a commit that referenced this pull request Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Performance / Optimization the number going down makes me happy :3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants