As the code stands now, it will not run.
Images will need to use win.blit to get the background image to show.
I do not see where you called the main function either.
Here is a basic example
Images will need to use win.blit to get the background image to show.
I do not see where you called the main function either.
Here is a basic example
import pygame import os # Set a path to current directory of executing script path = os.path.realpath(os.path.dirname(__file__)) # Pulling image from current directory # This could be some other path bg_image = pygame.image.load(f'{path}/my_img.png') # Set the screen screen = pygame.display.set_mode((800,600)) running = True while running: # Blit the image to the screen surface screen.blit(bg_image, (0,0)) for event in pygame.event.get(): if event.type == pygame.QUIT: running = False # Update the display pygame.display.update()
I welcome all feedback.
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags
Download my project scripts
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags
Download my project scripts