Skip to main content

What is gameplate?

The 3 KB TypeScript game framework. Zero deps. Any renderer.

import { createGame, defineActions } from 'gameplate';

const actions = defineActions<{ x: number }>()({
moveBy: (s, dx: number) => ({ x: s.x + dx }),
});

const game = createGame({
state: { x: 0 },
actions,
update: (state, dt, actions) => actions.moveBy(60 * dt),
render: (state) => draw(state),
});

game.start();

That's the API. Read it, write it, ship it.

What you get

A handful of composable primitives. Pick what you need, ignore the rest.

Each arrow is a function call — not a framework hook. Replace any node with your own implementation and the rest keeps working.

Why people use it

  • 🪶 3 KB gzipped. Smaller than a single sprite sheet.
  • 🦺 TypeScript-first. Strict mode, perfect inference, no as any.
  • 🎯 Renderer-agnostic. Bring Canvas, WebGL, WebGPU, PIXI, Three.js — anything.
  • ⏱️ Deterministic loop. Variable or fixed-step with interpolation.
  • 🎮 Headless-ready. Same code runs in the browser AND in Node.
  • 🎞️ Record & replay. Capture every action; replay deterministically.

Get started in 60 seconds

👉 Install → 👉 Quickstart → (one complete game in 30 lines) 👉 Why gameplate? → (vs. PIXI / Three / XState)

Or browse the guides: