Skip to content

Tile Forge ​

A tile editor with terrain and object layers, a map preview, validation and a playable Sokoban test. The tools belong beside the map, and play mode gives the board the available room.

Run it ​

Build the examples with devenv shell -- lcom-ng-build, then run:

sh
lcom-ng run -- build/examples/tilemap_editor build/tilemap-demo.mlmap

Try a complete workflow ​

Paint walls, floors and goals, then place the player and crates. Validate the map, enter a playtest and solve it. Return to editing with Escape and save the map for a later session.

Controls ​

ControlAction
1-5Floor / wall / goal / crate / player
Mouse drag / right-clickPaint / pick tile
Arrows + SpaceMove tile cursor and paint
DeleteErase the tile under the cursor
Enter / F5Switch editor / playtest
Arrows / WASD in playtestMove player
U / R in playtestUndo move / reset puzzle
Cmd/Ctrl+Z / Shift+ZUndo / redo map edit
V / GValidate / toggle grid
Cmd/Ctrl+S / S / F2Save map
Esc in playtestReturn to editor
F1 / ? buttonShortcuts

Command shortcuts work on macOS; Ctrl shortcuts work on other hosts. Esc closes help first. Cmd/Ctrl+W closes the app.

In the app ​

These are actual runtime captures. Open a screenshot for a larger view; use Left and Right to browse, and Escape to close.

Tile tools, map canvas and validation form a complete workspace.

Design the puzzle · Tile tools, map canvas and validation form a complete workspace.

What it demonstrates ​

Layered editing, map invariants, bounded parsing and serialization, keyboard movement and a separate playtest state.

A playable map needs a single player, matching crates and goals, and accessible puzzle space. Invalid drafts can be saved and corrected.

Source: examples/tilemap_editor.c.

Refresh these screenshots ​

sh
devenv shell -- python3 scripts/capture_gallery.py --app tilemap-editor

See the screenshot workflow to add states or check freshness.

Course/docs licensed CC BY 4.0. Code licensed MIT.