A lightweight TypeScript game engine.
Drop it into a page and it's running — no editor, no build step.
Describe your game as a state, a
render(state) function, and a
nextState({ state, event, keyboard }) function, and
Yuuna owns the render loop, input handling, and canvas drawing.
npm install yuuna-engine
Just a render loop and a state machine for canvas games — light enough to go from idea to playable in minutes.
Clicks, hovers, mouse movement, and frame ticks all flow
through a single nextState function.
No build step required — drop the browser bundle in a
<script> tag and start prototyping, like
the playground below.
Every Yuuna game comes down to three things — a
state, a nextState function, and a
render function. This walkthrough builds that idea up
step by step, using
Cookie Clicker — Yuuna's smallest
example — as the running example.
Pick a game below — the canvas and editor underneath load it instantly, and you can edit the TypeScript as it runs.
Looking for something smaller? See all examples, including small, focused snippets for one concept at a time.
Real projects made with the engine.
Prefer a working starting point over typing the quick start out by hand? Copy one of these with degit — it copies the folder without cloning the whole engine repo:
A single index.html, zero install — open it in a
browser and it runs.
TypeScript + a dev server with hot reload (via Vite), for a real local project.
The npm template wrapped in
Neutralino
to run as a native desktop window.
Each template's own README (in the folder above) has more on running it once copied — see the templates directory on GitHub.