Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, filename):
self.init_buffer([screen.get_width() / 2, screen.get_height() / 2])
tmx_data = pytmx.load_pygame("desert.tmx")
map_data = pyscroll.TiledMapData(tmx_data)
self.map_layer = pyscroll.BufferedRenderer(map_data, self.buffer_size)
f = pygame.font.Font(pygame.font.get_default_font(), 20)
t = ["scroll demo. press escape to quit",
"arrow keys move"]
self.text_overlay = [f.render(i, 1, (180, 180, 0)) for i in t]
self.center = [self.map_layer.width/2,self.map_layer.height/2]
self.camera_vector = [0, 0, 0]
self.running = False