AI-first · deterministic · headless

A deterministic, headless game engine.

The game is a pure function of its inputs; the render is only an observer. Hayao is built so an LLM can author, test, and prove correct a whole game without ever opening a browser — same seed, same build, same result, every run.

npm i hayao GitHub → API docs →
the proof

Twenty-six games, every one machine-verified.

One game per genre, plus physics and netplay showcases — built to test the engine end to end. Every level, board, and boss fight below is proven winnable by a solver or a bot before it ships — play them in your browser.

Sokoban

box-pushing puzzle

Pure solver-provable logic + a scene-tree SVG view + undo. Every level is machine-verified winnable.

Shard Ascent

precision platformer

Coyote time, jump buffering, dashes, corner correction, moving lifts. Every level is bot-proven beatable, deathless.

Thornspire

roguelike deckbuilder

Card DSL, telegraphed intents, drafts between fights — tuned to a proven 17/20 pilot win rate, with drafting proven to matter.

Vantage

turn-based tactics

Telegraphed attacks, push chains that rewrite the enemy's future — a perfect defence is machine-proven possible, and doing nothing proven fatal.

Duskveil

bullet hell

A pattern DSL, 480+ live bullets, grazing, focus mode — every phase proven survivable by a predictive dodge bot.

Bramblefall

real-time strategy

Flow-field pathfinding, 260+ units, a spear/cavalry/archer counter triangle — every counter edge is duel-proven and the war is bot-winnable.

Emberwake

horde survival

Auto-fire, level-up builds, 160+ enemies on the Canvas backend — the full night is bot-proven survivable and the sim steps in 0.02ms.

Hollowdeep

traditional roguelike

Procgen floors proven connected across 50 seeds, raycast FOV with map memory, bump combat — every dungeon bot-proven winnable.

Gleamvale

action-adventure

Sword arcs, hit-stop, telegraphed enemies, a key-locked vault — the full combat run is bot-proven winnable without dying.

Sproutveil

metroidvania

Ability-gated exploration where every gate is machine-proven impassable without its ability — and the whole run bot-proven beatable.

Veilstep

stealth

Raycast vision cones, detection meters, noise, bushes — the full idol run is bot-proven doable with zero alarms, and the punishments proven real.

Palewood

survival horror

A raycast-lit lantern, panned growls in the dark, fuel pressure that forbids camping — the night proven survivable, the dark proven deadly.

Cadence Hollow

rhythm dungeon

Move only on the pulse, foes dance in lockstep — the beat IS sim time, so even rhythm replays deterministically.

Glimmerfall

match-3

Cascade combos, spring-tweened choreography over an instant sim — 100 boards proven fair, targets proven reachable.

Pinshine

physics arcade

Swept-circle collision (no tunneling at any speed), restitution proven energy-honest, every board proven clearable by an aim-search bot.

Rookspire

demolition slingshot

Rigid-body castles (stacks, planks, ropes) razed by a CCD cannonball — every castle proven to fall within its stone budget by a siege bot.

Brasswick

pinball

A brass-and-felt table straight from the rigid-body world — kinematic flippers, bumper-bells, CCD-tight geometry proven ball-bound (0 escaped frames), and every unflipped serve proven to drain.

Vellgrove Rally

top-down racing

Understeer at speed, grass that punishes, cut-proof laps — braking proven faster than flooring it.

Fernclash

2-player netplay duel

Sumo shoving on a fern ring — hot-seat or true lockstep netplay across tabs/machines, peers proven to agree bit-for-bit.

Seamfold

twisted-torus sokoban · benchmark B1

Sokoban with no outside — seams that shift you sideways, every level proven to NEED the fold (unsolvable without it).

Gravewell

tap puzzle · benchmark B2

Collapse stars into black holes and sweep the debris in — every tap budget proven tight (par−1 is a proven loss).

Rootward

tower defense

Three counter-typed towers on an S-lane, ten ramping waves — the winning build is proven, and so is that arrow-spam LOSES to tanks.

Tarnholm

town builder

Every roof scores by its neighbours, with the gain shown live — placement skill proven to nearly double random play.

Fernrow

farming sim

Four seasons, energy-budgeted days, crops that wither out of season — the festival goal proven reachable, reinvestment proven to compound.

Lumen Forge

idle / incremental

DOM buttons flow through the deterministic input log; the whole pacing curve is simulation-verified.

Emberreign

narrative decisions

Four meters, double-edged cards, story arcs — judgement proven to matter (19/20 vs 0/20 reigns) and every doom proven honest.

build one

Point your agent at it.

Copy examples/sokoban/, import only from @hayao, and run npm test. The operating manual for humans and agents alike is AGENTS.md; the API surface lives in docs/API.md.