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

Re: [pygame] Very beginner level question



The screen will lock up if you don't collect events.  Obviously, look at the tutorials mentioned, but the basic idea is to collect events each frame with pygame.event.get() or something similar.  I use the following as a basic event checker:

for event in pygame.event.get():
    if event.type == pygame.QUIT:
        pygame.quit()
        sys.exit() #note you have to import sys

Ian