import pygame import sys from pygame.locals import * pygame.init() vec = pygame.math.Vector2 #2 for two dimensional 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((30, 30)) self.surf.fill((128, 255, 40)) self.rect = self.rect.get_rect(center = (10, 420)) class platform(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)) PT1 = platform P1 = Player( )