Skip to content Skip to sidebar Skip to footer

How To Add A Background Image In Python-pygame

I'm making a game, brickbreaker. I'm tring to add an image on the background, but it doesn't show up. I tried some other ways: Class background(pygame.sprite.Sprite) - I can see im

Solution 1:

I got your code to have a background image by changing

self.screen.blit("bg.png")

to

self.screen.blit(self.image, (0,0))

blit() takes two arugments the image and the position of it.

Post a Comment for "How To Add A Background Image In Python-pygame"