import pygame pygame.init() screen_width = 800 screen_hight = int(screen_width *0.8) screen = pygame.display.set_mode((screen_width, screen_hight)) pygame.display.set_caption('Shooter') class Soldier(pygame.sprite.Sprite): def __init__(self, x, y, scale): pygame.sprite.Sprite.__init__(self) img = pygame.image.load('Part 2 - Platformer/img/player/Idle/0.png') self.img = pygame.transform.scale(img, (int(img.get_width() * scale), int(img.get_height() * scale))) self.rect = self.img.get_rect() self.rect.center = (x,y) def draw(self): screen.blit(self.img, self.rect) player = Soldier(200, 200, 3) player2 = Soldier(400, 200, 3) x = 200 y = 200 scale = 3 img = pygame.image.load('Part 2 - Platformer/img/player/Idle/0.png') img = pygame.transform.scale(img, (int(img.get_width() * scale), int(img.get_height() * scale))) rect = img.get_rect() rect.center = (x,y) run = True while run: player.draw() player2.draw() for event in pygame.event.get(): #quit game if event.type == pygame.QUIT: run = False pygame.display.update() pygame.quit()