I've been trying to get Pygame to work for a while now. It runs without any issues, but nothing is shown on the screen. I did try to run the Pygame alien example game, it does not show up either - even though music starts playing
import pygame
pygame.init()
display_width = 800
display_height = 600
white = (0, 0, 0)
gameDisplay = pygame.display.set_mode((display_width, display_height))
pygame.display.set_caption("This is a game!")
clock = pygame.time.Clock()
running = True
while running is True:
for event in pygame.event.get():
if event.type is pygame.QUIT:
running = False
gameDisplay.fill(white)
pygame.display.update()
clock.tick(60)
In the above code I tried filling the screen with the color white, but the window is just blank (the default Mac OS colour)
EDIT: It seems like it is a problem with Mac OS Mojave
To clarify the code, I tried with red as well as black and white in the end, and nothing shows up