level-design-patterns
Installation
SKILL.md
Level Design Patterns
Godot TileMap Configuration
# TileMap setup and painting at runtime
class_name LevelTileMap extends TileMap
const LAYER_GROUND: int = 0
const LAYER_DECOR: int = 1
const SOURCE_ID: int = 0 # TileSet source index
func paint_tile(pos: Vector2i, atlas_x: int, atlas_y: int, layer: int = LAYER_GROUND) -> void:
set_cell(layer, pos, SOURCE_ID, Vector2i(atlas_x, atlas_y))
func clear_tile(pos: Vector2i, layer: int = LAYER_GROUND) -> void:
erase_cell(layer, pos)