""" Generate improved Tiled map with proper tile layers (not objects) """ import os OUTPUT_MAP = r"c:\novafarma\assets\maps\travnik_s_objekti.tmx" MAP_WIDTH = 32 MAP_HEIGHT = 32 TILE_WIDTH = 48 TILE_HEIGHT = 48 def create_simple_grass_map(): """Create a simple map with grass ground layer""" # Create CSV data for ground - all grass (tile ID 1) ground_data = [] for y in range(MAP_HEIGHT): row = ["1"] * MAP_WIDTH ground_data.append(",".join(row)) ground_csv = "\n".join(ground_data) xml_content = f''' {ground_csv} ''' os.makedirs(os.path.dirname(OUTPUT_MAP), exist_ok=True) with open(OUTPUT_MAP, 'w', encoding='utf-8') as f: f.write(xml_content) print(f"āœ… Created simple grass map: {OUTPUT_MAP}") print(f"šŸ“ Size: {MAP_WIDTH}x{MAP_HEIGHT} tiles") print(f"🟢 Ground layer: All grass") print(f"\nšŸš€ Open in Tiled to see the grass!") if __name__ == "__main__": create_simple_grass_map()