Construct 3 exports directly to HTML5 with no additional tooling. The output is a self-contained folder of HTML, JS, and assets that runs in any browser.
Export your game
- Open Menu → Project → Export
- Select Web (HTML5) as the export target
- Choose
build/as the destination folder - Extract the downloaded zip into
build/
SDK integration from Construct scripts
Wavedash injects Wavedash on the game's window before your code runs. Call it from a Construct script file (typically main.js) inside a runOnStartup handler. Use beforeprojectstart to hook into the earliest moment Construct guarantees the scene is set up:
// scripts/main.js
runOnStartup(async (runtime) => {
runtime.addEventListener("beforeprojectstart", () => {
const Wavedash = window.Wavedash;
// Your game logic here...
Wavedash.updateLoadProgressZeroToOne(1);
Wavedash.init({ debug: true });
});
});
Wavedash is injected on window before any script in the export runs, so you can reach for window.Wavedash synchronously.
Script file setup in the IDE
For your startup script to run, each script file in the Project panel needs an explicit Purpose (even (none) — leaving it unset silently breaks the export's script wiring):
- Right-click the
Scriptsfolder → Add script file, name itmain.js - Select
main.js, then in the Properties panel set Purpose to Main (there can only be one "main" script per project) - For every helper script (e.g.
pong.js,wavedash.js) set Purpose to (none) — the main script will thenimportthem via normal ES modules
wavedash.toml
game_id = "YOUR_GAME_ID_HERE"
upload_dir = "./build"