WavedashDocs

GB Studio

Export Game Boy games built in GB Studio to the web and ship them to Wavedash.

View example project on GitHub Playtest the example project

GB Studio builds Game Boy ROMs and bundles them with the binjgb emulator for web export, producing a self-contained build/web/ folder you can ship to Wavedash.

Export the game

  1. Open your .gbsproj file in GB Studio.
  2. Game → Export As → Export Web
  3. GB Studio writes the export to build/web/ inside your project, containing index.html, binjgb.js, binjgb.wasm, the compiled rom, and supporting JS/CSS.

Point upload_dir at ./build/web.

SDK integration

GB Studio's .gb ROMs can't call JavaScript directly — the SDK has to live in the web shell that hosts the emulator. GB Studio has a Custom HTML Head field in project settings that gets embedded into every web export, which is exactly what we want.

  1. In GB Studio, open Project Settings → Custom HTML Head (or edit project/settings.gbsres and set customHead).

  2. Paste:

    Calling Wavedash.init() is required. Your game stays hidden behind the Wavedash loading screen until you do. Call it once your game is ready to play.

    <script>
      try {
        const Wavedash = window.Wavedash;
        Wavedash.updateLoadProgressZeroToOne(1.0);
        Wavedash.init({ debug: true });
      } catch (e) { console.warn("[wavedash] init failed:", e); }
    </script>
    
  3. Re-export. GB Studio will now inline the script inside <head> of build/web/index.html, and it'll stick across future exports.

GB Studio caches the project in memory. If you edit settings.gbsres directly on disk while GB Studio is open, close and reopen the project before exporting so it picks up the change.

wavedash.toml

game_id = "YOUR_GAME_ID_HERE"
upload_dir = "./build/web"
entrypoint = "index.html"

Controls

GB Studio's web export maps Game Boy buttons to the keyboard by default:

Game Boy buttonKeyboard
AZ / Alt / J
BX / Control / K
StartEnter
SelectShift
D-padArrow keys or WASD

You can override these in Project Settings → Custom Controls.