A browser-based map and stage editor for tile-based games.
Grid Stage Builder helps you design one master map, split it into playable stages, place gameplay markers, draw enemy paths, preview the result, and export data for production use.
It started as a house-map workflow for a mobile tower defense game, but the tool is intentionally generic enough for any block-grid stage design.
Use the editor in your browser:
https://paiiap.github.io/grid-stage-builder/
No install step is required.
- Build a full master map on a fixed 48 x 48 grid.
- Divide the master map into multiple named stages.
- Place room areas, furniture/object blocks, doors, walls, build zones, and terrain.
- Add stage gameplay markers such as spawn, base, build slot, waypoint, and choke point.
- Draw multiple paths per stage and connect each path to its spawn and base.
- Expand path areas by painting extra walkable blocks.
- Preview a selected stage before export.
- Export project JSON, stage JSON, image prompts, and PNG previews.
- Show validation errors with stage context, path context, and blocking object references.
- Switch between classic, dark, and pastel UI themes.
- Open the editor in a browser.
- Use
Mapsmode to draw the master map. - Add rooms and place map objects.
- Switch to
Stagemode. - Create a stage frame over the area that should become a playable level.
- Add spawn and base markers.
- Create one or more paths and assign the matching spawn/base pair.
- Use path expansion for wider walking areas.
- Check validation and stage preview.
- Export the stage data or the full project.
Use this mode to build the reusable master map.
Maps mode handles the house/layout data: rooms, tile properties, walls, build state, furniture blocks, doors, and object placement.
Use this mode to design playable levels from the master map.
Stage mode handles level-specific data: stage bounds, spawn/base markers, paths, path width, path expansion, stage preview, and stage export.
The top toolbar uses project language because a saved project includes both map data and stage data.
New Projectcreates a fresh editor document.Save Projectexports the full project JSON.Load Projectimports a previously saved project JSON.Load Samplerestores the built-in sample layout.
The editor also saves the current project in browser localStorage while you work.
The sample project is also available as examples/sample-project.json.
Each stage can be exported separately.
Available stage exports:
GameJSONfor game/runtime data.Image Promptfor image-generation prompt text.PNG Fullfor the complete stage image with art, grid, game points, path, and furniture names.PNG Artfor room color, terrain, structure, furniture, furniture names, and grid.PNG Game Pointsfor path, spawn/base/build slots, and grid.
Stage JSON is cropped to the stage area and includes only the relevant tiles, rooms, objects, markers, and paths used by that stage.
The validation panel catches common stage-design issues before export.
Examples:
- path missing spawn or base
- path does not start on its assigned spawn
- path does not end on its assigned base
- path goes through a blocked tile
- path collides with a blocking object
- stage area leaves the master map
When a path hits furniture or another blocking object, the message includes the stage and object, so it is easier to fix the correct level.
No build step is required.
Open index.html directly in a browser.
npm test
npm run checkThe tests cover core map/stage behavior, export rules, validation rules, and static UI wiring.
index.html- application shell and controlsstyles.css- layout, themes, and visual stylingapp.js- editor interaction, rendering, persistence, and UI statecore.js- map data model, stage export, path rasterization, and validationtests/- Node tests for core behavior and UI structure
This is an early production-tool prototype.
The current focus is making stage design fast, readable, and exportable for a tile-based game pipeline.
Detailed map-builder status is tracked in docs/map-builder-status.md.