import pygame, sys from pygame.locals import * from pygame.sprite import AbstractGroup pygame.init() screen = pygame.display.set_mode((1600,800)) pygame.display.set_caption('Rects :DDDDDDDDDDDDD') class Player(pygame.sprite.Sprite): def __init__(self) : super().__init__() self.image = pygame.image.load("Player_Spirte_R.png") self.rect = self.image.get_rect() while True : events = pygame.event.get() for event in events : if event.type == pygame.QUIT : pygame.quit() sys.exit() pygame.display.update()