I'm doing a game with python : pygame and pytmx, pyscroll with TiledMap, I know how to do orthographic map with pyscroll like
tmx_data = pytmx.util_pygame.load_pygame("Map.tmx")
map_data = pyscroll.data.TiledMapData(tmx_data)
map_layer = pyscroll.orhographic.BufferedRenderer(map_data, self.screen.get_size(), self.surface)
self.group = pyscroll.PyscrollGroup(map_layer = map_layer, default_layer = 1)
But I don't want to do orthographic (rect) game, what I want to do is an isometric game but using Tiled and pytmx, pyscroll, I tried this :
import pygame
import pytmx
import pyscroll
class Game:
def __init__(self):
self.screen = pygame.display.set_mode((0, 0), pygame.FULLSCREEN)
self.clock = pygame.time.Clock()
pygame.display.set_caption("Henry's Bizarre Adventure")
tmx_data = pytmx.util_pygame.load_pygame("assets\Map\Tiled-Map\Main_Room.tmx")
map_data = pyscroll.data.TiledMapData(tmx_data)
map_layer = pyscroll.isometric.IsometricBufferedRenderer(map_data, self.screen.get_size())
self.group = pyscroll.PyscrollGroup(map_layer = map_layer, default_layer = 1)
def run(self):
running = True
while running:
self.group.draw(self.screen)
pygame.display.flip()
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
if event.type == pygame.KEYDOWN:
if event.key == pygame.K_ESCAPE:
running = False
pygame.quit()
But it doesn't work and still display into orthographic like this: Pygame TiledMap