def setup(): global screen, game_controller, input_controller, main_tileset, map_level_1, player # Initializes pygame pygame.init() # Initializes the screen screen = pygame.display.set_mode(constants.SCREEN_SIZE, pygame.DOUBLEBUF) # Initializes the game controllers game_controller = GameController() input_controller = InputController() # Load the sprites main_tileset = Tileset(constants.FILEPATH_TILESET_MAIN, constants.TILESIZE) # Load the maps map_level_1 = Map() map_level_1.load_background(constants.FILEPATH_LEVEL1_BACKGROUND, main_tileset) map_level_1.load_foreground(constants.FILEPATH_LEVEL1_FOREGROUND, main_tileset) map_level_1.load_colliders(constants.FILEPATH_LEVEL1_COLLIDERS, main_tileset) # Load the player player = Player(constants.FILEPATH_CHARSET)