View: Multi-Page Single Page

Simple States

Switch & state logic puzzles — generated, verified, and fully analyzed.

A puzzle toolkit for Unity with four modes from one workflow: Classic (find the combination — press the right SET of switches), Ordered (find the order — gated chains, decoys, and traps), Lights Out (flip the grid — with paintable pattern goals), and Trilight (the mod-3 grid — cells cycle off → dim → bright). Every board is solved exactly, rated, stamped with a proven par, and stored as a ScriptableObject. You bring the scene, input, and art — or ship the included 3D demo.

v1.0 · by Living Failure

What it is

Simple States generates switch-and-state logic puzzles. A switch toggles a set of states; the player wins by turning every state on. The vocabulary is deliberately presentation-agnostic — a state renders as a door, a light, a lock or a valve, and a switch as a plate, a lever or a button. The data says nothing about how any of it looks. In Classic mode order never matters — the puzzle is finding the right combination of switches, and the deduction lives in the states that several switches share. In Ordered mode switches are gated behind board states, so they only fire in sequence — with decoy switches that never help, and optional traps that turn a state back off when pressed, making wrong tries cost work.

Lights Out is the grid cousin: every cell is simultaneously a light and a button, and pressing one flips it plus its orthogonal neighbours. Boards up to 56 cells, scrambled backwards from the solved state so every one is solvable by construction — and the goal is yours: light everything, black everything out, or paint a target pattern (a heart, an arrow, a letter) for the player to hit.

Trilight pushes the grid to three states: cells cycle off → dim → bright, a press bumps a cell and its neighbours one step, and bright wraps back to off — so a cell can need two presses. The math stays exact (linear algebra over ℤ₃ instead of GF(2)), the head-space is genuinely different.

It doesn't just make boards — it solves them exactly. Every generated puzzle carries a full analysis: solution count, the shortest solution, every solution, each switch's role (required / optional / dummy), rule diagnostics, and a 1–5★ difficulty rating. All deterministic from a seed.

Features

Four modes

Classic combinations, Ordered sequences, Lights Out grids, and mod-3 Trilight — one data model, one window, one API shape.

Exact solving

Exhaustive subsets up to 16 switches; GF(2) Gaussian elimination beyond; ℤ₃ for Trilight. No sampling — solution counts are ground truth.

Traps, verified fair

Ordered traps turn states back off on wrong presses — and every board passes a no-deadlock proof: the goal stays reachable from every reachable state.

Pattern goals

Lights Out and Trilight targets are paintable: all lit, blackout, or any clicked-in shape — solvable by construction.

Par on every board

The proven shortest solution ships in the data; the demo scores presses against it, golf-style.

Full analysis

All solutions, switch roles, overlap diagnostics, challenge score, warnings, design notes, generation report.

Difficulty stars

A 1–5★ rating from the prototype-calibrated challenge score; Lights Out rated by press count.

Deterministic

Any board reproduces from a short seed string.

ScriptableObjects

Save single puzzles or ordered packs; both feed the demo or your own scenes.

Zero core deps

Pure-C# generators and solvers. Built-in, URP, and HDRP.

Editor tooling

One Generate window for all four modes — presets, Auto-tune, batches, guardrails — plus rich inspectors with Verify and Re-roll.

A real demo

Canvas menu and HUD, click-to-press 3D boards for all four modes, step-by-step auto-solver, procedural sound.

How it works

1

Configure

Pick a mode, states/switches (or the grid), solution style, decoy and trap policies — in the Generate window or via GenerationSettings.

2

Generate

The generator rolls candidate rule sets (or scrambles a solved grid), rejecting boards that miss your constraints — solution style, size window, decoys, traps, overlap shape.

3

Solve & rate

The exact solver analyzes the winner: solutions, roles, diagnostics, difficulty. Ordered trap boards additionally pass the no-deadlock proof.

4

Store & play

Save as a puzzle / pack ScriptableObject, drive the demo's StatesGame, or read the bitmask rules straight off StatesPuzzle in your own scripts.

Why "verified" matters

Lots of generators make solvable boards. Simple States proves more: exactly how many solutions a board has (so you can ship "one right answer" levels), the true shortest solution (so difficulty is honest), and — for trapped Ordered boards — that no sequence of wrong presses can ever strand the player.

TipThe persisted summary (solvable, count, shortest, unique, ★) rides along inside every saved asset, and the full analysis recomputes on demand in the inspector — nothing is trusted from generation time.

Getting started