2

I try to make a display in Pygame, but it won't show up. There is no errors or problems and when I run the code it only shows:

Hello from the pygame community. https://www.pygame.org/contribute.html

The code:

import pygame

pygame.init()
pygame.display.set_mode((500, 500))

I have also tried resetting my whole Mac and downloaded it again, still won't work...

MacOs version = 10.13.6
Python version = 3.8.0
Pygame version = 1.9.6

martineau
  • 119,623
  • 25
  • 170
  • 301
  • 1
    Add an infinite `while` loop to let the program stay up. Like this, the code ends and the program is closed immediately. Be also aware that pygame may not run on python 3.8 (too new, issues have been reported), you may need to use python 3.7. – Valentino Nov 03 '19 at 14:59
  • 1
    You need to have an event processing loop as described in section [2.4](https://www.pygame.org/docs/tut/tom_games2.html#makegames-2-4) of the [Making Games With Pygame](https://www.pygame.org/docs/tut/MakeGames.html) tutorial. – martineau Nov 03 '19 at 15:20

0 Answers0