[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] pygame.display.flip slow



Hi,

To me, these results suggest that the faster-framerate machine is running with VSync enabled for some reason and the slower-framerate machine is running without. Also, what I said about setting pixels on the CPU still goes, albeit that's not the issue here.

Offhand, I would guess that the faster-framerate machine is running Windows, which doesn't enable VSync, and the slower-framerate machine is running something else. But I don't know.

In general, faster framerates are pointless (you can't even display them), so one should be satisfied with ~60Hz refresh, and make the logic independent of timestep (locking the framerate to the refresh rate is a good thing; the fascination with faster framerates is due to modern video games running <60Hz, or to gamers running >60Hz with tearing (and without VSync).). There are platform-specific ways to disable VSync. It's not even that hard for OpenGL contexts. But it's sortof an X-Y problem that doesn't need solving.

Ian