Skip to content

Publishing your game ​

bash
npm run build

npm run build writes your game to dist/: an index.html, your code and only the assets the game uses. It prints a size report, and fails if dev-only code leaked into the build. dist/ is a static site, so it runs anywhere that serves files.

On your own site, or any static host ​

Upload dist/ to any static host: Cloudflare Pages, Netlify, GitHub Pages, Vercel or your own server. No server code is needed.

itch.io ​

Zip the contents of dist/ (with index.html at the top level of the zip, not inside a folder), create a project with Kind of project: HTML, upload the zip and tick This file will be played in the browser. Set the embed size to your game's resolution, or a multiple of it.

For a downloadable desktop version, see Desktop builds.

Game portals (Poki, CrazyGames and others) ​

Portals have rules about branding, links and ads. Read each portal's current requirements before you submit, but these are the ones that affect debuff games.

Turn off the splash for Poki

Production builds open with a short "made with debuff" card. Poki doesn't allow splash screens, so turn it off:

ts
const game = new Game({ canvas, width: 320, height: 180, splash: false });
  • Splash: Poki requires games to have no splash screens. Its rules allow your studio logo on the loading screen only. Other portals may not mind a short "made with" card, but splash: false is the safe choice for any portal.
  • No links out of the game: portals don't allow links that send players to other websites. debuff's splash has no link or URL, so it's fine where splashes are allowed. Don't add your own links or URLs in menus, credits or end screens unless the portal says they're allowed. CrazyGames, for example, allows community links (like Discord) in the main menu, as long as they aren't the main call to action and don't lead to a playable copy of the game.
  • Ads go through the portal's SDK: portals provide their own SDK for ads, and often for pausing and analytics. Don't add other ad systems.
  • Everything bundled: Poki blocks requests to outside servers unless they're approved. debuff builds bundle your code and assets into dist/, so a plain debuff game makes no outside requests. Keep it that way, and avoid loading fonts or scripts from CDNs.
  • Size matters: portals favour games that load fast. The size report from npm run build shows what players download at startup.

Requirements: Poki · CrazyGames

Before you ship ​

  • npm test and npm run build pass, and the build reports no dev leaks.
  • Play the build itself (npx vite preview), not the dev server, on a phone and a desktop.
  • For a portal: splash: false if it's Poki, no links out, and the portal's SDK wired in.