How to add a background image into pygame?

For background I always make an image the size of my game window or smaller then before all of the images are displayed, I blit that image to 0,0.

bg = pygame.image.load("bg.png")

#INSIDE OF THE GAME LOOP
gameDisplay.blit(bg, (0, 0))

#REST OF ITEMS ARE BLIT'D TO SCREEN.

Hope this helps.

Leave a Comment