# debuff vs KAPLAY

KAPLAY and debuff are both small JavaScript frameworks for 2D browser games, and both aim to get you to a playable game quickly. KAPLAY continues the Kaboom.js line, with a friendly component API and an online playground. debuff puts its weight on deterministic testing and working with coding agents. Here's how they compare as of October 2026.

## Short answer

Pick **KAPLAY** if you want the gentlest start: a playful API, a browser playground with lots of examples, and an established community. Pick **debuff** if you want deterministic tests, fuzzing and an agent that can attach to your running game.

## At a glance

| | debuff 0.20 | KAPLAY 3001.0.19 |
| --- | --- | --- |
| License | MIT | MIT |
| Language | TypeScript | JavaScript, with TypeScript support |
| API style | Scenes with `update` and `render`, immediate-mode drawing | Game objects built from components (`pos`, `area`, `body`) |
| Physics | Tile collision | Simple body physics and collisions built in ([README](https://github.com/kaplayjs/kaplay)) |
| Try it in the browser | Examples on debuff.jp | [KAPLAYGROUND](https://play.kaplayjs.com) with 90+ examples |
| Full runtime, brotli | 30 kB (every debuff package) | 59 kB (`kaplay.mjs`) |
| Testing | Scenarios, screenshot baselines, fuzz, [Keiko](./introducing-keiko) | Up to you |
| Coding agents | MCP server for the running game, `AGENTS.md` | No llms.txt ([404](https://kaplayjs.com/llms.txt)), no official MCP found |
| Community | Small | Established (Discord, subreddit, itch.io jams) |

KAPLAY's stable line is 3001; a v4000 preview is available on npm under the `next` tag.

## Where KAPLAY is stronger

- **First hour.** The component API reads almost like a description of the game, and KAPLAYGROUND lets you try things without installing anything.
- **Built-in gameplay helpers.** Bodies, collisions, state machines and effects like screen shake are a function call away.
- **Community.** It inherits Kaboom's audience and has an active Discord and regular jams.

## Where debuff is different

- **Determinism.** debuff runs on a fixed-step clock with a seeded RNG, so the same input gives the same game. That's what makes its scenarios, exact replays and fuzzing possible.
- **Testing built in.** `npm test` runs scenario scripts headless with screenshot baselines. `npx debuff fuzz` plays with random input and saves each crash or stuck state as a scenario that reproduces it.
- **Agent tooling.** KAPLAY's [AI guide](https://kaplayjs.com/docs/guides/ai/) is about game AI (state machines and rule systems), not coding agents. debuff ships an MCP server, an `AGENTS.md` in every new project, and workflows such as `tune-feel` and `fix-errors`. See the [agent comparison post](./coding-agents-and-browser-game-engines).
- **Typed params.** Feel values have types, ranges and units, show up as sliders in the dev overlay, and can be tuned by an agent within those ranges.
- **Tools around the engine.** [Keiko](./introducing-keiko) runs a web game in Node on a virtual clock, so timing tests take milliseconds. [Myaku](./introducing-myaku) finds frames players feel drop in any engine, KAPLAY included, and [plonk](./introducing-plonk) adds game music written in code.

## Which to choose

For learning, jams with friends, or the quickest path to something on screen, KAPLAY is a great choice. If you want tests and an agent in the loop from the start, try debuff:

```bash
npm create debuff@latest my-game
```