-
Notifications
You must be signed in to change notification settings - Fork 188
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
low framerate #186
Comments
I've never seen anything near as low as 10 FPS. I'm running on Windows though. I do notice occasional stuttering. I'm not sure if it's due to vsync/tearing or the fact that every now and then a frame takes longer than 16ms to render (when I calculate FPS I get around 58). If I modify pgzero/game.py and bump the frame rate from 60 to e.g. 120 it runs a lot more smoothly (although I don't get 120FPS - more like 110). Maybe b/c even when a frame is dropped there are so many more in between? |
I'm seeing this same issue on a 2017 MacBook Pro 13 inch. Same code as the example just change the dimensions to 800 x 600 and there a 10x drop in speed. |
I believe this might be the same issue reported here: Today I was trying a simple example with pygame 1.9.6 and increasing the window size was causing performance to degrade on my Macbook Pro. I switched to pygame 2.0.0dev6 and (subjectively speaking) the problem went away. Could pygame zero be made to use pygame 2.0.0 dev versions? |
I think that issue is #145, although framerate issues are mentioned later in the thread.
No, but when Pygame 2.0 proper is released we can pin to it. I'd note that at a Python meet-up recently some users reported seeing it take tens of seconds to actually launch a window, even under Pygame 2.0, as I recall. Upgrading to a bleeding-edge version may come with other problems. |
Closing as likely to be stale by now, several Pygame versions later. |
Consider this simple program:
It's essentially the same example as on the Introduction to Pygame Zero page, except I've made the window size larger.
On my mid-2018 Macbook pro, this runs very choppily. If I stick in the optional time argument in the
update
function and print its value, it reveals a frame-rate of around 10 fps. Decreasing the window size improves the framerate, and increasing it makes it worse.Is this known behaviour, and is it because of the Retina display? Are there are workarounds?
The text was updated successfully, but these errors were encountered: