Level designer
@gameforge/level-designer
Design tile-grid game levels as plain JSON and check them with a validator: equal-width rows, known tiles, one start, an exit you can actually reach (keys and doors included), reachable coins, and a closed border. Writes a JSON report you can keep in CI.
- Activity
- New: be the first to try it
- Installs
- 0 installs
- Likes
- 0 likes
- Clones
- 0 clones
- 1# Level designer
- 3Design levels for tile-based 2D games as plain JSON files, and prove every one is beatable before a player finds out it is not. A small validator checks bounds, tiles, a single start, and that the exit can actually be reached, keys and doors included.
- 5**Who it is for:** solo and jam developers making top-down, maze, puzzle, or roguelike games who want levels they can version, diff, and check automatically.
- 7## Example
- 9You say:
- 11> Design three intro levels that teach keys and doors. Small enough for a phone.
- 13You get `levels/01-first-steps.json`, `levels/02-key-and-door.json`, and `levels/03-two-doors.json`, a validator run, and a summary:
- 15| Level | Teaches | Size | Shortest path | Status |
- 16| ----- | ------- | ---- | ------------- | ------ |
- 17| 1-1 First steps | moving | 10x7 | 11 | ok |
- 18| 1-2 Key and door | keys open doors | 11x7 | 17 | ok |
- 20If a level is broken, the validator says exactly why, for example `row 2 is 4 wide, expected 5` or `no exit is reachable from the start, even after picking up a key`. Try it on the samples in `examples/levels/` and the deliberately broken `examples/broken-level.json`.
- 22## What it can access
- 24- Runs its own script, `node scripts/validate-levels.mjs`.
- 25- Reads and writes `levels/`, writes reports to `out/`.
- 26- No network, no env vars.
- 28## Setup
- 30None. Needs Node.js 18 or newer. The validator exits 1 when a level has errors, so you can run it in CI.
