Guide on how to deploy a game made with Defold to Wavedash

I made a game for the GamedevJS Jam 2026 and deployed the game to Wavedash, it was suprisingly easy!

I followed the docs:

I did it in a bit different order though (I started the project on Wavedash first, but I noticed later, you can init the project from CLI - search for wavedash init - where you can name the game and create a ready toml file):

  1. Create Wavedash account in dev-portal and create a project:

  2. Open it and copy the game ID:

  3. Create a wavedash.toml file in your project root with below content and put your game ID there:

# Replace this with the game ID from the Wavedash Developer Portal.
game_id = "<YOUR_GAME_ID_HERE>"

# Bundle the Defold HTML5 export into this folder before running wavedash dev/push.
upload_dir = "./dist"

entrypoint = "index.html"
  1. I actually added this simple Lua module to initialize the Wavedash SDK inside the game (very similar to the one in doc, but a little bit changed, I want to dig into the documentation more to understand how to write a good reusable Lua module for it still):
---@class wavedash
local M = {}

local function clamp(value, min_value, max_value)
	if value < min_value then
		return min_value
	end
	if value > max_value then
		return max_value
	end
	return value
end

local function run(code)
	if not html5 then
		return nil
	end

	return html5.run(code)
end

function M.is_available()
	return run("window.WavedashJS ? '1' : '0'") == "1"
end

function M.update_load_progress(fraction)
	local normalized = clamp(tonumber(fraction) or 0.0, 0.0, 1.0)
	run("window.WavedashJS && window.WavedashJS.updateLoadProgressZeroToOne(" .. string.format("%.4f", normalized) .. ")")
end

function M.init()
	run([[
if (window.WavedashJS && typeof window.WavedashJS.init === "function") {
	if (!window.__defold_wavedash_init_promise) {
		window.__defold_wavedash_init_promise = window.WavedashJS.init();
	}
}
]])
end

return M
  1. And used it in my main.script in init():
	wavedash.update_load_progress(1)
	wavedash.init()
  1. Bundle your game for web (wasm):

  2. The game’s build should in the specified "dist" folder ( Defold reserves the top-level build/ directory for its internal build cache. Use a different name like dist/ for your upload directory.), so I copied it there:

  3. Download the Wavedash CLI. I was doing it on Linux, but they support also Mac and Windows. Here’s manual: Quickstart — Wavedash Docs, I used:
    curl -fsSL https://wavedash.com/cli/install.sh | sh

  4. So when CLI is here, log in:
    wavedash auth login - it opens a web browser to authorize the login (if you’re logged in to Wavedash)

  5. Push the build:
    wavedash build push
    It should start pushing:

[========================================] 100% ✓ Build uploaded successfully!                                                                                                                                                                                
▶ Play at: https://wavedash.com/playtest/space-base-maintenance/a6b403ae-982f-4f7d-84d7-e29af9bafe1e

And it’s now playable here (as playtest):

https://wavedash.com/playtest/space-base-maintenance/a6b403ae-982f-4f7d-84d7-e29af9bafe1e


Hmm, builds are stored separately, so each time you get a new link:

https://wavedash.com/playtest/space-base-maintenance/a556a579-3049-46f4-a582-7b7f7368f290


And here’s published page (you can add descriptions, tags, images, etc):

8 Likes