0

I have a code for a loading bar that displays one image, and then another image with more pixels. My problem is that I can't get the images to load at the correct time. Here's my code:

import pygame, time, sys
pygame.init()
DISPLAY = pygame.display.set_mode(1250, 700)
clock = pygame.time.Clock()
active = True
image1 = pygame.image.load('C:/...')
image2 = pygame.image.load('C:/...')
DISPLAY.blit(image1, (0, 0))
time.sleep(5)
DISPLAY.blit(image2, (0, 0))
while active:
    for event in pygame.event.get():
        if event.type == pygame.quit:
            pygame.quit()
    pygame.display.update()
    clock.tick()

Now this is obviously an abbreviated copy, not doing all the erroneous to this question loading and stuff, but this is where the problem is located. I start the program, the pygame window says it's not responding, and then I get image2 without ever having image1. There is no error message, and I've had this glitch for quite a while. Any ideas?

Nether Man
  • 70
  • 1
  • 10

0 Answers0