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

Web build capped at 40 fps. #26

Open
AlexJWayne opened this issue Jan 13, 2025 · 2 comments
Open

Web build capped at 40 fps. #26

AlexJWayne opened this issue Jan 13, 2025 · 2 comments

Comments

@AlexJWayne
Copy link

I added only this line to watch FPS:

rl.DrawText(fmt.ctprintf("FPS: %1.f", 1 / rl.GetFrameTime()), 5, 5, 20, rl.WHITE)
image

And it won't go above 40.

The desktop build seems fine.

I also tried the same in https://github.com/karl-zylinski/odin-raylib-web and that gets 120 just fine.

Chrome perf trace that shows no work being done, so something wierd with the frame scheduler maybe?

image
@karl-zylinski
Copy link
Owner

This doesn't happen on my machine. Web build runs at 60 fps, as does my desktop build. Both in chrome and Firefox. Can you try in Firefox to rule out if your chrome has some kind of capping setting enabled?

@AlexJWayne
Copy link
Author

Hmm, for me Chrome (TR) and Arc (BL, built on Chromium) are 40ish, Firefox (BR) seems to be more spiky but is 50 fps in this screenshot and Safari (TL) is rock solid 59/60.

image

Maybe this is my stuff being weird... I'll do some binary search debugging and see if I can narrow it down when I get some more time...

So perhaps ignore this for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants