more creativity, less setup.
An open-source framework for 2D browser games. It handles the boring bits so you can get to the fun part sooner.
An open-source framework for 2D browser games. It handles the boring bits so you can get to the fun part sooner.
Empowering best-in-class 2D web games
Most game ideas don't die from bad design. They die in setup, somewhere between the game loop and the sound that won't play.
debuff handles the setup. Start from a template and you're already tinkering: wobble things, break them, keep what makes you grin.
No spelunking through game.world.systems.physics.step(). A game is a scene with update and render, and the fun stuff is one call away.
const game = new Game({ canvas, width: 320, height: 180 });
const input = new Input(game, {
bindings: { pop: ["Space", "PadA", "Pointer"] },
});
game.add(play).go("play");
game.start();// Too floaty? Drag the slider in the dev panel until it feels right.
const tuning = game.params.define("player", {
speed: { type: "number", default: 140, min: 0, max: 600, units: "px/s" },
});
player.vx = approach(player.vx, dir * tuning.values.speed, accel * dt);if (input.pressed("pop")) {
// squish, sparkle, rumble, boop
squash(tweens, player, 0.35);
particles.emit({ x: player.x, y: player.y, count: 16, gravity: 200 });
game.camera.shake(0.3);
audio.synth({ freq: 660, freqEnd: 220, decay: 0.15 });
}import { expect, play, test } from "keiko";
test("never leaves the screen", async () => {
const game = await play<State>();
game.press("ArrowLeft");
game.during("3s", (s) => s.player.x >= 8, "buff stays on screen");
});{
"steps": [
{ "press": "ArrowRight" },
{ "wait": 30 },
{ "release": "ArrowRight" },
{ "expect": { "state.player.x": { "gt": 200 } } },
{ "capture": "moved" }
]
}debuff is made of parts you can use without it, in any engine or none.
Draws every debuff game, and works in any other. Immediate mode, WebGL2, a Canvas 2D fallback.
Sprites are plain text: open them in any editor, see exactly which pixels changed in a code review, and let a script or a coding agent draw them. Exports for Phaser, Pixi and debuff, and opens Aseprite files.
Meet the slime →Four games to play right here, each with its source and the docs behind it. The size on each card is its JavaScript, brotli-compressed.
Agents are welcome and never required. With the debuff MCP server, an agent like Claude Code can play the game you have open, read its state and see why it crashed, tune params and check its changes with scenarios. Every action it takes shows up in your dev panel, and you can undo any of it.
New projects ship an AGENTS.md with the commands and rules, so agents start with the right context. Creative calls stay with you: the tools are built for agents to propose and people to decide.
Built on the shoulders of Vite, Vitest, happy-dom, TypeScript, Tiled, LDtk and more open-source work. Thank you.
Build your first game Source on GitHub Ask a question Sponsor us
Sponsored by Wavedash