import pygame import sys from pygame.locals import * pygame.init() vec = pygame.math.Vector2 HEIGHT = 450 WIDTH = 400 ACC = 0.5 FRIC = -0.12 FPS = 60 FramePerSec = pygame.time.Clock() displaysurface = pygame.display.set_mode((WIDTH< HEIGHT)) pygame.display.set_caption("Game") class player(pygame.sprite.Sprite): def _init_(self): super()._init_() self.surf = pygame.Surface((WIDTH, 20)) self.surf.fill((255, 0,0)) self.rect = self.surf.get_rect(center = (WIDTH/2, HEIGHT))