misskey-dev / misskey

🌎 A completely free and open interplanetary microblogging platform πŸš€
https://misskey-hub.net/
GNU Affero General Public License v3.0
10.03k stars 1.37k forks source link

Physics in `physics.ts` and Misskey's Bubble Game are framerate-dependant #14860

Open CenTdemeern1 opened 4 days ago

CenTdemeern1 commented 4 days ago

πŸ’‘ Summary

Physics in Misskey's Bubble Game and physics.ts were likely meant to run consistently across devices and screens, but instead they run faster at higher frame rates.

This was first brought up on Sharkey's issue tracker: https://activitypub.software/TransFem-org/Sharkey/-/issues/684

I have fixed this bug and I am creating issue before creating the accompanying pull request.

πŸ₯° Expected Behavior

Misskey's Bubble Game and physics.ts should run at the same speed on a 60hz screen and a 120hz screen.

🀬 Actual Behavior

Misskey's Bubble Game and physics.ts run at twice the speed on a 120hz screen compared to a 60hz screen.

πŸ“ Steps to Reproduce

Open Misskey's Bubble Game or find the hidden physics easter egg. Compare behavior across different refresh rate screens. (Note: Safari calls window.requestAnimationFrame at 60hz even on higher rate screens by default for consistency. This can be bypassed via a feature flag.)

πŸ’» Frontend Environment

Desktop:

Mobile

πŸ›° Backend Environment (for server admin)

Do you want to address this bug yourself?

KisaragiEffective commented 4 days ago

Thanks for forwarding report. I marked this as actual bug because a few people have reported same issue from distinct server (plus the Sharkey's thread).