import pygame from pygame.locals import * pygame.init() screen_width = 1000 screen_height = 1000 screen = pygame.display.set_mode((screen_width, screen_height)) pygame.display.set_caption('faith through fire') tile_size = 50 bg_img = pygame.image.load('game background.png') def draw_grid(): for line in range(0, 20): pygame.draw.line(screen, (255,255,255),(0, line * tile_size), (screen_width, line * tile_size)) pygame.draw.line(screen, (255,255,255),( line * tile_size,0), (line * tile_size, screen_height)) class Player(): def __init__(self, x, y): img = pygame.image.load('main mansyand.png') self.image = pygame.transform.scale(img, (40, 80)) self.rect = self.image.get_rect() self.rect.x = x self.rect.y = y def update(self): #draw player onto screen screen.blit(self.image, self.rect) player = Player(100, screen_height - 130) class World(): def __init__(self, data): self.tile_list = [] def draw(self): for tile in self.tile_list: screen.blit(tile[0], tile[1]) #game varibles wave = 1 playerhealth = 125 run = True while run == True: for event in pygame.event.get(): if event.type == pygame.QUIT: run = False pygame.display.update() pygame.quit()