Skip to content Skip to sidebar Skip to footer

Pygame Does Not Blit Unless I Call Pygame.event.get()

After crashing my head against the monitor for 2 hours I realised that: display.blit(mypic, posx, posy) pygame.display.update() would just not work (i.e. wouldn't blit anything o

Solution 1:

I'm not 100% sure how it works with mac but I am assuming it is similar to windows in that if you don't call pygame.event.get() regularly the operating system thinks that the window has stopped responding and no longer updates it.

This is mentioned under pygame.event.pump() in the events page of the Pygame documentation

For each frame of your game, you will need to make some sort of call to the event queue. This ensures your program can internally interact with the rest of the operating system. If you are not using other event functions in your game, you should call pygame.event.pump() to allow pygame to handle internal actions.

Post a Comment for "Pygame Does Not Blit Unless I Call Pygame.event.get()"