尚未检测到更新。GitHub 发布版本后会显示在这里。
开源工具包,可处理 2D 浏览器游戏的基础功能,让您可以构建想象中的游戏。为创意留出更多空间。
AI 翻译
Open-source toolkit that handles the basics of 2D browser games, so you can build the game you imagined. More room for play.
正在加载完整 README。
查看完整 README ↗more room for play.
debuff is an open-source framework for 2D browser games that handles the basics for you (the game loop, controls, sound, levels, testing, shipping) so you get to that game sooner and spend your time on what makes it yours.
Status: 0.9, early development. APIs will change, and feedback from real games shapes them.
You need Node.js 22 or newer.
npm create debuff@latest my-game
cd my-game
npm install
npm run dev
Open the URL it prints, then press </kbd> in the game for the dev panel. Edit src/main.tsand the game reloads. The first command asks which template you want. Base templates are starting points for your own game:basic(the minimal starter),topdown(a tile world seen from above),isometric(a 2:1 grid),sidescroller(run and jump) andpointclick(rooms, hotspots and an inventory), all but the first with pixel art drawn in [tenten](https://github.com/debuffjp/tenten). Examples are finished small games to learn from:platformer, mossfell(a top-down adventure) andsquish(a match-3 that plays well on phones). Skip the question with-- --template . pnpm, Yarn and Bun work too (pnpm create debuff`, and so on).
New projects include a .mcp.json, so a coding agent like Claude Code can play and inspect the game you have open, and draw its pixel art with tenten. See the agent guide.
Working on debuff itself? Clone the repo, then run npm install and npm run build. cd templates/platformer && npx debuff dev runs a template against your local packages, and the repo's .mcp.json points the MCP server at it. See CONTRIBUTING.
| Raw canvas + JS | debuff | |
|---|---|---|
| Sprites at 60 fps | ~5,000 | ~100,000 one call each, ~800,000 in bulk (spryte: WebGL2 with a Canvas 2D fallback) |
| Small game, shipped | what you write | ~19 kB brotli for the starter, everything included |
A crash in update | the loop dies silently | stops, says whose bug it is, links the source line |
| Tuning feel | edit, reload, replay | sliders while you play, with undo and copy back to code |
| AI agents | read code and guess | play your game: state, frames and errors, and you see what they did |
More in Why debuff. Agents can start from llms.txt.
以上为 README 的开头部分。其余内容请阅读原文。 查看完整 README ↗