[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Vertical Sync
Could make it a switchable option with a few standard framerates as targets.
On 11/1/05, Patrick Mullen <saluk64007@xxxxxxxxx
> wrote:I've found that you get pretty good results if you limit the
framerate, a lot of times the jerkiness is due to fluctuation in
framerate rather than low framerate. You can do this with the pygame
clock:
clock = pygame.Clock()
while mainloop:
dt = clock.tick(60) #limit to 60 fps
#use dt for time sensitive calculations
of course, it wont necesarily be in sync with the monitor's refresh
rate, and if you're already doing this (but I wouldn't expect it if
your getting 800 fps) than oh well, it was worth a shot ;)
--
Andrew Ulysses Baker
"failrate"