Examples
Small, real games built with debuff, each with its source, controls and the docs behind it. They run against the current release (0.1).
Plinko: sprite stress test
Balls fall through a peg board and a spinning paddle into bins. It's calm by default. Press stress test and it keeps adding sprites while your device holds 60 fps, then shows how many it held.
- Controls: click or tap the board to drop more balls; play/pause in the corner.
- Shows: batched
draw.spriteat scale, a fixed-step simulation, allocation-free hot loops,game.stats. - Source: examples/plinko/plinko.ts, about 300 lines using only
@debuffjp/core. - Docs: Drawing · Core concepts · Benchmarks
Platformer
buff runs, jumps and collects coins across a level made in Tiled. This is the platformer template, unchanged. It's a production build, so it opens with the "made with debuff" card.
- Controls: arrow keys or A/D to move, Space, Up or W to jump, Down to drop through orange platforms. A gamepad works too.
- Shows: Tiled level import, tile collision with one-way platforms, coyote time and jump buffering, a camera with deadzone, an atlas-packed sprite sheet, particles and squash-and-stretch.
- Source: templates/platformer. Start your own copy with:
npm create debuff@latest my-game -- --template platformer- Docs: Tilemaps and collision · Input · Assets · Tunable params
Mossfell
A wanderer crosses the fell, screen by screen, to find the mossheart in the hollow below. Swing a blade at slimes, moths and thornbulbs, find the key, open the door and face the warden. Moss and plum instead of lime: debuff doesn't come with a look of its own.
- Controls: arrow keys or WASD to move, Z, Space or J to swing. A gamepad works too.
- Shows: screen-by-screen scrolling over one Tiled map, a small dungeon behind stairs, sword hitboxes and knockback, hearts and invulnerability frames, enemies that respawn per screen, and synthesized sound effects.
- Source: templates/mossfell. Start your own copy with:
npm create debuff@latest my-game -- --template github:debuffjp/debuff/templates/mossfell- Docs: Tilemaps and collision · Scenarios · Tunable params
Squish
A match-3 with jelly in it. Swap two neighbouring blobs to line up three or more; they swell, pop and rain down, and cascades stack up combos. Every piece squashes when it moves and wobbles when it lands, and each colour has its own shape too. It's built for phones first: tap, or swipe a piece.
- Controls: tap a piece then a neighbour, or swipe a piece. On a keyboard: arrows to move, Space or Z to pick up, then an arrow to push. A gamepad works too.
- Shows: pure, testable game rules kept apart from the animation, fixed-timer phases so every run replays exactly, squash-and-stretch and particles from
@debuffjp/juice, pointer and swipe input, and everything drawn in code with no art files. - Source: templates/squish. Start your own copy with:
npm create debuff@latest my-game -- --template squish- Docs: Input · Testing · Tunable params
Overbuffed
buff against the swarm, for ten minutes. You only move: buff's weapons fire on their own, critters drop XP, and every level offers three upgrades to stack until buff is absurdly overbuffed. Every sprite and letter boils like a flipbook, in the spirit of Baba Is You, and the text is drawn in debuff sans, debuff's own pixel font.
- Controls: arrow keys or WASD to move (or hold the mouse or a finger where you want to go). On a level-up, left/right to pick and Space or Z to take. A gamepad works too.
- Shows: hundreds of enemies on a spatial grid at about 1 ms per step, data-driven weapons, upgrades and waves, multiple scenes, dev commands that let tests and agents skip ahead, logic tests and scenarios with accessibility checks, and sprites generated in Aseprite by a script.
- Source: debuffjp/overbuffed, an open project we're building in public to find what debuff should do better. Its FRICTION.md lists what it turned up.
- Docs: Testing · Scenarios · Tunable params
Make your own
The minimal starter is the quickest way in. Made something with debuff? Tell us in an issue. With your permission, we'd love to feature it.