View: Multi-Page Single Page

Simple Hamiltonian

Generate verified cover-all path puzzles — Square & Hex.

A puzzle generator for Unity. Make one-line "cover-all" boards (the solution fills every tile in a single unbroken path), prove they're uniquely solvable, and store them as ScriptableObjects. You bring the movement, input, and art.

v1.1 · by Living Failure

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

1

Configure

Pick shape, mode, size, coverage, checkpoints — in the Generate window or via GenerationSettings.

2

Generate

The path-first generator builds a cover-all board with well-distributed obstacles (topology-aware for square and hex).

3

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.

4

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.

TipCoverage is the uniqueness dial — a nearly-full grid is rarely unique. In Fixed mode, click Auto in the Generate window to set a coverage your grid can verify at, fast.

Getting started