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

Re: [pygame] Game stutters



R. Alan Monroe wrote:
If the ball's just bouncing around why not do
screen.fill((0,0,0),ballRect)
screen.blit((ballImage,ballRect)
pygame.display.update(ballRect)

I tried that on my box... didn't make any difference. My guess is it's
due to not being locked to vsync.

Also, pythonw appears to totally crush the hard drive on each launch (according to sysinterals filemon), naively hunting all around the path for a bunch of nonexistent files, then recursively enumerating every folder in the \python24 tree, for some reason, which causes a lot of slowdowns until it's done reading.

Switching the program to FULLSCREEN|DOUBLEBUFF and using flip() rather
than update() did make it quite a bit smoother.

Alan


That first example I sent had an extra parenthesis. I'm surprised it actually worked.
line 2 should be screen.blit(ballImage,ballRect)