[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] Flickering Sprite



Guyon Morée wrote:
> I am very new to PyGame. I created a little arena with some 'tanks' in it to
> drive around and hopefully shoot around. I've got a lot of it working, but
> the thing that i'm noticing is a 'extra' flickering sprite in the topleft
> corner. This only happens when i use more then 4 sprites. I am probably
> doing something wrong here. please take a look at the source below if you
> will, some parts of it are from the chimp tutorial :D

cool, this is the first pygame thing i've seen using threads to control
each object. seems to work pretty well. i didn't get any flickering when it
ran on my machine. i'm running on straight X11 in linux. what platform are
you getting the flickering?

usually flickering sprites is a result of calling display.flip() or
display.update() more than once per frame. that was the first thing i
looked for in your code, but it appears you've done everything properly.

if you're on windows and it seems directx is in use, try falling back on
the simple DIB driver and see if it flickers. easy to do, either do
set "SDL_VIDEODRIVER=windib" before you run it from the commandline, or add
a temporary "os.environ['SDL_VIDEODRIVER']='windib'" into your game before
you pygame.init().

____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org