# Map Editor Static browser-based editor for the game's `.map` files. ## Run Locally From the repository root: ```powershell python -m http.server 8787 ``` Open: ```text http://127.0.0.1:8787/tools/map_editor/ ``` The editor can fetch `game/assets/map/stage_01.map` when served from the repo root. It can also open any `.map` file through the file picker. ## Current Scope - Open `.map` text files. - Visualize world, camera, player spawn, collision, stage rects, tile rects, battle zones, and spawn points. - Select objects from the canvas or object list. - Drag objects on the canvas with grid snapping. - Edit selected object numeric properties. - Add/delete collision rectangles, tile rectangles, battle zones, and spawn points. - Download a serialized `.map` file compatible with `StageMapLoader`. ## Limitations - Browser security prevents direct overwrite of the original local file. Use Download and replace the project `.map` manually, or deploy with a server-side save endpoint later. - Tileset image preview is not implemented yet; tile rects use fallback colors. - Undo/redo and multi-select are not implemented yet.