1 · Install
Import the package. Everything lives under Assets/SimpleKlotski/ and nothing is added to your scenes until you ask for it.
The core (data model, solvers, generators) is plain C# with no Unity dependencies. The demo uses TextMesh Pro and the Input System package; if you only want the generator and the puzzle data, neither is required.
Render pipelines: the demo tints its blocks through a material property block, setting both _BaseColor and _Color, so it looks right in Built-in, URP and HDRP without swapping shaders.
2 · Generate a board
Open Window ▸ Living Failure ▸ Simple Klotski ▸ Puzzle Generator.
Take a preset
Press Presets and pick Gridlock — easy lot 6×6. Presets set a whole recipe: mode, board size, move window and attempt budget.
Generate
Press Generate. Boards are produced on a background thread, so the window stays responsive and you can Cancel a long batch.
Try the other modes
Clear Snakes — full board 16×16 fills a large board with interlocking ropes; Klotski — classic deep 4×5 engineers a long solve; Clear — parking lot 6×6 gives you arrows and taps; 3D Clear — tap cube 4×4×4 builds a lattice you can orbit in the preview.
3 · Read the analysis
The right-hand pane is the point of the tool. Top to bottom:
- Verdict — the proven par ("Par 14 moves"), how many shortest solutions exist, and the star rating. Clear boards read "Clears in 12 taps · chain depth 5".
- Board — a drawn preview: blocks with their tags, the hero marked, the exit notch or target outline, obstacles, checkpoint pads. 3D boards offer an orbitable preview and a layer-slice view.
- Best solution — a slider that steps the board through the solution one move at a time, with the moved block highlighted. Below it, the full notation and a Copy solution button.
- Facts and Generation report — the numbers, plus how many attempts it took and whether your filters were matched or relaxed.
The scrubber is the fastest way to judge a board. Drag it and you can see whether the solution is a satisfying shuffle or a straight line.
4 · Save it
Press Save and choose:
- Current — one KlotskiPuzzleAsset.
- Pack (all) — the whole batch as one ordered KlotskiPuzzlePack.
- Pack (unique only) — just the single-solution boards.
Both asset types have inspectors with Verify (re-solve and restamp) and Re-roll (regenerate from the board's own stored settings with a fresh seed).
5 · Play it
Open the demo scene in Assets/SimpleKlotski/Scenes/ and press Play. Pick a mode, then Play Endless for fresh generated boards or Play Level Pack for a pack you assigned on the KlotskiDemo component.
Controls, also shown on the HUD while you play:
- Gridlock / Klotski — drag a block to slide it.
- Clear Snakes — click anywhere on a rope; it slithers out head first.
- Clear — click a block to send it off.
- Clear 3D — click a block to pull it free; Alt-drag orbits, middle-drag or Shift-drag pans, scroll zooms.
- R reset · Z undo · H one hint move · F step-by-step auto-solve.
6 · Use it in your own game
Generate at runtime, or load a saved asset and drive the referee:
var puzzle = GridlockGenerator.GenerateVerified(settings);
game.LoadLevel(puzzle);
game.LevelSolved += OnWin;
Everything the UI needs is on the puzzle itself: MinMoves (par), Difficulty, Solvable, and the full Analysis when you want the moves. See the API Reference.
Where to next
- Generating — every dial, what it does, and which combinations are reachable.
- Demos — how the demo scene is wired, and how to reskin it.
- Troubleshooting — fallbacks, warnings and limits.