pygame / pygame

🐍🎮 pygame (the library) is a Free and Open Source python programming language library for making multimedia applications like games built on top of the excellent SDL library. C, Python, Native, OpenGL.
https://www.pygame.org
7.32k stars 3.25k forks source link

screen display #4092

Open cmacington opened 10 months ago

cmacington commented 10 months ago

hello, i am new here so, i want to submit an issue. here is my issue: when i launch : pygame.init() #it respond "(5, 0)" so it's fine but when i launch : screen = pygame.display.set_mode((1280, 720) #the screen begin to fade away like this Screenshot_20231119_081355 Screenshot_20231119_081409. the picture Screenshot_20231119_081409. is the same pygame display capture as the picture Screenshot_20231119_081355 but it disappeared.

guaixiao7720 commented 8 months ago

Hello, your game must have a main loop and use the pygame.event.get() function. Otherwise, the event will be blocked and your game window will not respond.

JouhoPK commented 8 months ago

You need to use pygame.event.get() or pygame.event.flip() at the end of the program.