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

[pygame] refresh problem



hi to all!
this is my first post in pygame (windows xp, python 2.5). i've started using pygame some days ago and after a bit of coding i'm completely stuck. the problem is that even the simpliest code like

import pygame
from pygame.locals import *
pygame.init()
screen = pygame.display.set_mode( (640,480) )

done = False
while not done:
    pygame.display.flip()
    for event in pygame.event.get():
        if event.type == QUIT:
            done = True

get the game window to freeze. it just doesn't update and acts strangely. the window is like "transparent", it makes me see what is behind it. if i minimize it and then reopen it, it shows the content, but if i drag it around the screen, it sort of "collects" the images it overlaps.. i've tried various code to get around the problem, like various flags in set_mode, flip and update and event pumping but nothing seems to work. it shows no problem in fullscreen mode, though.
any idea? thanks in advance,
gustavo