import pygame , sys class Crossair(pygame.sprite.Sprite): def __init__(self,width,height,pos_x,pos_y,color): super().__init__() self.image = pygame.Surface([width,height]) self.image.fill(color) self.rect = self.image.get_rect(center =( pos_x,pos_y)) # general setup pygame.init() clock = pygame.time.Clock() # game screen screen_width = 1920 screen_height = 1080 screen = pygame.display.set_mode((screen_width,screen_height)) background = pygame.image.load("BG.png") # crosshair crosshair = Crossair(50,50,100,100,(255,255,255)) crosshair_group = pygame.sprite.Group() crosshair_group.add(crosshair) while True: for event in pygame.event.get(): if event.type == pygame.QUIT: pygame.quit() sys.exit() crosshair_group.draw(screen) screen.blit(background,(0,0)) pygame.display.flip() clock.tick(60)