I am currently working on a little simple game for a class and because I am supposed to then give it to my teacher who will be looking at it on his own computer, I can't use paths like pygame.image.load('C:/Users/name/Desktop/project/mapwitheverything.png')
But when I don't, even if my python file and my image are in the same file, VSC always shows me "FileNotFoundError: No file 'mapwitheverything.png' found in working directory 'C:\Users\name'"
Here is my current code:
class ysortcameragroup(pygame.sprite.Group):
def __init__(self):
super().__init__()
self.display_surface = pygame.display.get_surface()
self.half_width = self.display_surface.get_size()[0] // 2
self.half_height = self.display_surface.get_size()[1] // 2
self.offset = pygame.math.Vector2()
self.floor_surf = pygame.image.load('mapwitheverything.png').convert_alpha()
self.floor_rect = self.floor_surf.get_rect(topleft = (0,0))