尚未偵測到更新。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 ↗