What it is
Simple Hamiltonian generates grid puzzles whose solution is a single unbroken line that visits every walkable tile exactly once — a "cover-all" or Hamiltonian path. It's the core behind one-line / snake / zip puzzle games.
It doesn't just make boards — it verifies them. A sound solver reports whether a puzzle has exactly one solution, so you can ship "guaranteed unique" levels. Generate single puzzles or whole packs, on square (4-neighbor) or hexagonal (6-neighbor) grids, Free or Fixed mode with ordered checkpoints — all deterministic from a seed.
Features
Square & Hex
4-neighbor and pointy-top 6-neighbor grids from one API.
Verified unique
Solution counter with a sound connectivity prune plus node and time budgets — it never hangs.
Difficulty rating
Every verified board scored 1–5 stars from the solver's effort; roll toward a target rating.
Free or Fixed
Start/end anywhere, or fixed endpoints with ordered numbered checkpoints.
Deterministic
Any board reproduces from a short seed string.
ScriptableObjects
Save single puzzles or packs; one list mixes both.
Zero core deps
Pure-C# generator/solver/rules. Built-in, URP, and HDRP.
Editor tooling
A Generate window with one-click Auto config, off-thread batch generation, preview and save, plus inspectors with a grid preview, Verify, and Re-roll — all undoable.
A real demo
A ready-to-play 3D demo scene: drag-to-draw play, win flow, procedural sound, a landing menu, auto-solver.
How it works
Configure
Pick shape, mode, size, coverage, checkpoints — in the Generate window or via GenerationSettings.
Generate
The path-first generator builds a cover-all board with well-distributed obstacles (topology-aware for square and hex).
Verify
The solver counts solutions and stamps One / Multiple / Unknown, then rates the board 1–5 stars. In Fixed + Require Unique it hunts for a single-solution board within the budget.
Store & play
Save as a puzzle / pack, or feed PuzzleData straight to your game and drive moves through HamiltonianRules.
Why "verified" matters
Lots of generators make solvable boards. Few prove a board has exactly one solution. That guarantee is what lets you build fair, satisfying puzzles.
Getting started
- Quick Start — your first puzzle (no code, or 5 lines of C#).
- Generating Puzzles — the Generate window and every setting.
- API Reference — types and methods.
- Demos — build and skin the playable demo.
- Troubleshooting — common questions.