PICO-8 exports carts to a single self-contained HTML file that embeds the p8.js runtime alongside your cart data. Wavedash hosts that file directly.
Export the cart
From the PICO-8 console:
load mygame.p8
export mygame.html
PICO-8 writes mygame.html and mygame.js next to the cart. You can also use -p to customise the HTML shell template. By default the export is standalone — no assets to fetch at runtime.
Move the two files into an upload directory of your choice (the example repo uses ./build/).
SDK integration
PICO-8 Lua can't call JavaScript directly, so the SDK has to run inside the exported HTML shell. Open the generated mygame.html and add the following just before </body>:
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>
PICO-8 regenerates the HTML on every export, so either re-paste after each export or use a custom shell template:
export mygame.html -p my-template.html
Where my-template.html is a copy of PICO-8's default export template (pico-8/plates/template.html inside the PICO-8 install directory) with the SDK snippet already embedded. PICO-8 will substitute your cart data into the template on every export.
wavedash.toml
game_id = "YOUR_GAME_ID_HERE"
upload_dir = "./build"
entrypoint = "index.html"
Rename the exported mygame.html → index.html so the Wavedash sandbox finds it at the entrypoint path. The matching mygame.js filename is referenced from within the HTML, so don't rename that one.
Controls
PICO-8's web player maps controls to keyboard by default:
| PICO-8 button | Keyboard |
|---|---|
| ⬅ / ➡ / ⬆ / ⬇ | Arrow keys |
| O (action) | Z / C |
| X (action) | X / V |
| Pause | Enter / P |