Pygame image wont show up until I close the window
JavaScript
1
Posts
1
Posters
0
Views
1
Watching
-
I am creating a game with pygame and an image won't show up until the window is loading to be closed. This is my code so far: ``` import pygame pygame.init() screen = pygame.display.set_mode((800, 600)) pygame.display.set_caption("ALix") icon = pygame.image.load("nater.jpg") pygame.display.set_icon(icon) playerImg = pygame.image.load('nater.jpg') playerX = 400 playerY = 300 def player(): screen.blit(playerImg, (playerX, playerY)) running = True while running: screen.fill((255, 255, 255)) for event in pygame.event.get(): if event.type == pygame.QUIT: running = False player() pygame.display.update() ```