Skip to content
debuffjpPublic

About

Official and community plugins for debuff

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

debuff plugins

Plugins for debuff, the TypeScript framework for small, polished 2D web games. This repo holds the official plugins and the list of community ones.

npm install @debuffjp/plugin-achievements
import { achievements } from "@debuffjp/plugin-achievements";

const trophies = achievements({ list: [{ id: "FIRST_COIN", title: "First coin", when: { event: "coin" } }] });
game.use(trophies);
game.emit("coin"); // unlocked, saved, and visible to `debuff inspect`

Plugins

Official

Package What it does Source
@debuffjp/plugin-achievements Achievements unlocked by game events, saved locally, readable by tools and platform adapters plugins/achievements
@debuffjp/plugin-analytics Batched gameplay analytics (scenes, events, errors) sent to any endpoint you choose plugins/analytics
@debuffjp/plugin-announce Screen reader announcements for canvas games through an ARIA live region plugins/announce

Community

None yet. Yours could be first: see Add your plugin.

Add your plugin

Anyone can list a plugin here. Open a pull request that adds an entry to community.json:

{
  "name": "debuff-plugin-screenshake",
  "description": "Trauma-based screen shake with params you can tune live",
  "repo": "https://github.com/you/debuff-plugin-screenshake",
  "author": "you",
  "kinds": ["runtime"]
}

Then run npm run registry to update the tables above, and npm run check.

To be listed, a plugin needs to:

  1. Be published to npm as debuff-plugin-<name> or @scope/debuff-plugin-<name>, with the debuff-plugin keyword.
  2. Follow the plugin rules: named after itself, cleans up fully on game.dispose(), no monkey-patching, dev-only code behind import.meta.env.DEV.
  3. Have a README with an install line and a working example.

Listing isn't an endorsement or a review. We check the rules above and that the package installs. Kind is runtime for browser plugins (game.use), tooling for debuff.config.ts plugins (asset importers, CLI commands, scenario steps), or both.

Writing your first one? Start from the plugin guide, copy the smallest plugin in plugins/, and ask in the Discord.

Working on this repo

npm install
npm run check   # lint, build, test, registry

Official plugins live in plugins/<name> and publish as @debuffjp/plugin-<name>. They depend only on the published @debuffjp/core, the same way a community plugin would.

MIT licence.

About

Official and community plugins for debuff

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages