0

I am trying to make a kind of loading-screen thing. I want every 5 seconds to change the background picture. I tried using pygame.time.wait()but it does not work. Here is my code:

import pygame

pygame.init()

screen = pygame.display.set_mode((0, 0), pygame.FULLSCREEN)

bomb_1 = pygame.image.load("bombs/bomb-1.png")
bomb_2 = pygame.image.load("bombs/bomb-2.png")


def loading():
    screen.blit(bomb_1, (0, 0))
    # I want to wait here
    screen.blit(bomb_2, (0, 0))
Coding_Guy
  • 21
  • 3
  • `blit()` draws in buffere in memory and you have to use `flip()` or `update()` to send buffer to `video card's memory` which will display it on screen. – furas Apr 28 '22 at 12:34

0 Answers0