Skip to content

Small credits refactor #5660

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

Merged
merged 3 commits into from
Feb 27, 2025
Merged

Small credits refactor #5660

merged 3 commits into from
Feb 27, 2025

Conversation

leaKsi
Copy link
Contributor

@leaKsi leaKsi commented Feb 25, 2025

About The Pull Request

Right now, every /atom/movable/screen/credit is duplicated for every client that doesn't have credits disabled.
This results in a lot of objects being created and deleted every second while credits are rolling.
I think it was coded this way to support different viewport sizes, but it doesn't actually work(?).

This PR massively reduces the total amount of created objects, while maintaining the same look.
Also, credits now properly adjust their position when player's viewport size changes.

Example
New.-.Smallest.mp4

Why It's Good For The Game

Less lag during round-end.

Changelog

🆑
refactor: Credits have been slightly refactored. This should result in increased perfomance during the end of the round.
/:cl:

@Kitsunemitsu Kitsunemitsu added the Feature: Refactor/Rework Completely redoing a larger thing / recoding a thing label Feb 25, 2025
@Absolucy Absolucy added the Code: Performance / Optimization the number going down makes me happy :3 label Feb 26, 2025
@Absolucy Absolucy merged commit 63e94ad into Monkestation:master Feb 27, 2025
28 checks passed
github-actions bot added a commit that referenced this pull request Feb 27, 2025
@leaKsi leaKsi deleted the credits-fixes branch March 8, 2025 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code: Performance / Optimization the number going down makes me happy :3 Feature: Refactor/Rework Completely redoing a larger thing / recoding a thing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants