-
Notifications
You must be signed in to change notification settings - Fork 46
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
Runs extremely slowly in firefox #547
Comments
I'm having the same issue. ✅ Running on linux (Manjaro) for what its worth. Cute game, good work on it. Hope you can figure this out. |
Same here: ✔️ Brave 1.51.114 (64-bit) Running on Kubuntu 23.04:
Keep up the good work 👍 |
I think there's an easy way to fix this! I used https://profiler.firefox.com/ to see what's so slow. The game is spending all its time in Canvas methods ( There are two easy ways the game can work around Firefox's slow Canvas:
A pro game developer would want to get off the CPU. Maybe this is crazy, but I wonder if the game would suddenly run much faster if it just used images (scaled with CSS) for the backgrounds. It's possible to take it much further and use SVG for everything, or make the jump to WebGPU, but |
OK, #562 implements fix 1. Fix 2 is a bit harder. Currently, screen coordinates (such as the coordinates in mouse click events) are assumed to be the same as canvas coordinates. I think it's possible to fix this by applying a transform to ctx, but I haven't tried it yet. |
from ff bugzilla:
I'm not super versed with canvas APIs, but shouldn't it be possible to move this to the GPU? If not, what might a WebGL port look like? https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Optimizing_canvas |
It looks incredibly ghastly. No good. |
The FPS is around 8-10 in Firefox 120.0 (64-bit) on my computer. In the current (https://sinerider.com) version also the time is slowed down, however it's fixed in the development version (https://sinerider.hackclub.dev) - but the performance is still poor. |
Also seeing this on https://sinerider.hackclub.dev on Firefox 121, Fedora Linux 39 |
Description
Observed game speed is 1/2 or less of what I experience in chrome.
Chrome 112.0.5615.49 (64-bit)
Firefox 112.0.2 (64-bit)
Screenshots
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: