# PirateMaker In-game level editor + play loop, proving editor = runtime. ```{raw} html ▶ Run in browser

Upstream: https://github.com/clear-code-projects/PirateMaker

``` **Tags:** `port` `tier-2` # PirateMaker: SimVX port Side-scrolling pirate platformer with an in-game level editor. Tier 2 #20: port of [clear-code-projects/PirateMaker](https://github.com/clear-code-projects/PirateMaker) (CC0 code + Pixelfrog CC0 art). ## Run ```bash # Desktop cd /home/fezzik/dev/simvx uv run --with pillow python ../ported_games/piratemaker/simvx_port/main.py # Headless screenshots (writes 7 PNGs to screenshots/) uv run --with pillow python ../ported_games/piratemaker/simvx_port/main.py --test ``` ## Controls - **Editor**: LMB drag-paint, RMB drag-erase, MMB pan, mouse-wheel pan, `[` / `]` cycle selection, **Enter** play, **S** save, **L** load, **Q** quit. - **Play**: Left/Right (or A/D) to move, Space (or W/Up) to jump, **Esc** back to editor. ## Layout - `main.py`: `PirateMakerRoot` toggles between editor and play modes. - `settings.py`: TILE_SIZE, screen size, the EDITOR_DATA tile-id table. - `support.py`: folder-of-PNGs animation loaders. - `harness.py`: `--test` deterministic capture mode. - `nodes/editor.py`: `EditorMode`, `EditorObject`, `Cloud`, `CanvasTile`, palette. - `nodes/level.py`: `PlayMode` builds a runnable level from the editor's grid dict. - `nodes/player.py`: Player movement, gravity, AABB collision, animation. - `nodes/enemies.py`: Spikes, Tooth, Shell, Pearl. - `nodes/folder_sprite.py`: Sprite2D that cycles paths. - `nodes/save_load.py`: JSON save/load to `levels/level.json`. See `../NOTES.md` for engine friction and design deviations. ## Source ```{literalinclude} ../../examples/ports/piratemaker/main.py :language: python :linenos: ```