I made a game in Defold. How do I share the HTML5 build and get players?
Bundle the game with Project, Bundle, HTML5 Application, then upload the folder it writes to a web host or to itch.io as a ZIP. Include the non-threaded wasm-web engine, because the threaded one only runs on an https page with cross-origin isolation. Test the bundle from a web server, then list the play link on Foundplay.
Checked November 22, 2026 against Defold's HTML5 manual and itch.io's HTML5 upload docs. Written by Foundplay, a game discovery platform for free browser games. Foundplay also sells Boost, a paid promotion for games, and this guide says where it fits. The advice before that part works without it. All guides
Create the HTML5 bundle
- In the Defold editor, select Project, Bundle, HTML5 Application, and pick a folder. When it finishes, the folder holds every file the game needs to run.
- Choose the engine architectures. Defold's manual lists two:
wasm-web, the regular non-threaded engine, andwasm_pthread-web, which can use threads. With both included, the loader picks the threaded one where the browser and host support it and falls back towasm-webeverywhere else. - Upload the whole folder to your host, or zip it for itch.io. Players need a modern browser with WebAssembly support.
Threads need cross-origin isolation
The threaded engine needs SharedArrayBuffer, which browsers only allow on a secure, cross-origin isolated page. That means https (or localhost while you test) and headers such as Cross-Origin-Opener-Policy: same-origin and Cross-Origin-Embedder-Policy: require-corp. Anything the page loads from other sites needs compatible CORS or Cross-Origin-Resource-Policy headers as well.
Defold's manual says a bundle with only wasm_pthread-web can't run when those conditions aren't met. If you can't control the headers, or the game may be embedded on someone else's page, include wasm-web so it still loads.
Serve the bundle over HTTP
- Don't open
index.htmlfrom your disk. Defold's manual says the bundle needs an HTTP server. Project, Build HTML5 starts one for you, or run a small local server in the bundle folder. - If the console says the WebAssembly compile failed because of an incorrect response MIME type, the server has to send
.wasmfiles asapplication/wasm. - A game that freezes at the splash screen in Chrome is often running from the file system.
- An Unexpected data size error usually means a build made on Windows went through Git with the wrong line-ending settings, which changed the file sizes. Fix Git's line endings and bundle again.
Fit the page and the screen
Defold writes a fresh default page every time you bundle, with a light and a dark theme and four scale modes: Downscale Fit, Fit, Stretch and No Scale. Fit shows the whole canvas with its proportions, Stretch fills the page, and Downscale Fit only shrinks the game when the page is smaller than it. Change the page through game.project, since edits to the generated files are lost.
- Don't give the canvas a border or padding. The manual says mouse coordinates go wrong if you do.
- With High Dpi on,
html5.max_pixel_ratiocaps how many pixels the engine draws on dense phone screens, which saves work without changing the game's size on the page. - The requested graphics context is WebGL 2 by default. Test on older phones if you rely on it.
- game.project can hide the Fullscreen button and the Made with Defold link if your page has its own.
Memory, saves and load time
The engine reserves a 256MB heap by default. If your game needs less, set heap_size lower, which helps phones with little memory. Defold's manual points to three things to work on for HTML5: memory use, engine size and game size, since web players judge a game by its first load.
sys.save() and io.open() work, but the files live in the browser's IndexedDB, and there can be a short delay before a write is stored. Save at checkpoints, not only as the player leaves. Hot Reload doesn't work in HTML5 builds, so test web changes with a fresh build.
Put a Defold bundle on itch.io
Zip the bundle folder with index.html at the top, upload it and mark it to be played in the browser. itch.io's docs limit a web build to 1,000 files and 500MB once extracted, and without its Mobile Friendly option phone players see a warning that the game may not work. Include wasm-web in the bundle so the game runs whether or not the page is cross-origin isolated.
How Foundplay can help
Foundplay is a game discovery platform for free browser games. It doesn't host games: every listing sends players to the creator's own site.
The free listing
Listing a game is free. Paste the link where people play it at /submit, check the details and publish. The game goes live right away, and Play sends players to your own site.
Paste the address of the hosted bundle or of your itch.io page. Foundplay fills in the details from the page, and the engine checker shows whether Foundplay finds Defold on it.
Boost, the paid option
Foundplay sells Boost, so it has a reason to want you to buy it. The free listing works without it.
The plan called Boost ($10 for 30 plays in 5 days) lets strangers try the bundle on their own devices and shows whether they press Play on your cover. Check your own analytics for who got past the splash screen, since Foundplay counts the click on Play.
The Boost plan costs $10 for 30 plays in 5 days, which works out to 33¢ a play. Where it shows: Your genre's game pages, the top of matching searches and surprise me picks.
A play is a counted click on Play from a sponsored spot, the same way public play counts work: once per game per network a day. Every sponsored spot is labelled Sponsored, and the share of plays not delivered by the end of the plan's days is refunded automatically. Foundplay can't see what players do after the click. Fan games and copies of commercial games can't be boosted. A game has to be listed before it can be boosted. List it first, or start a Boost and add your play link there, and Foundplay lists the game for free as part of the same flow.
For scale, Foundplay's own visit counter shows an average of 3,000+ visitors a day over the last three full days, and 3,500+ games are listed. It updates every few minutes.
More free ways to find players are in the full guide.
Questions
- Why does my Defold HTML5 game freeze at the splash screen?
- It is usually running from the file system. Defold's manual says the bundle needs an HTTP server: use Project, Build HTML5 in the editor, run a local server in the bundle folder, or upload it.
- Do I need cross-origin isolation headers for a Defold web game?
- Only for the threaded
wasm_pthread-webengine. Include the non-threadedwasm-webengine too, and the loader falls back to it on any page that isn't cross-origin isolated. - What does the Defold error Unexpected data size mean?
- Defold's manual says it usually happens when a build made on Windows is committed to Git with the wrong line-ending settings, which changes the file sizes. Fix Git's line-ending configuration and bundle again.
- Can I put a Defold game on itch.io?
- Yes. Zip the bundle with
index.htmlat the top, upload it and mark it to be played in the browser. Includewasm-webso the game still loads if the page isn't cross-origin isolated.