TL;DR: Dusk Synth now runs in the browser. The Unity 6 build targets WebGPU with a WebGL 2 fallback, downloads about 42 MB, and holds about 59 FPS in Chrome on a Mac. Pick any of the six worlds with a URL flag. The player is below, and the project is tracked in the Dusk Synth lab.
Nothing downloads until you press Play. If the player does not load in your browser, open it on its own page: play Dusk Synth.
What Is Running
The build comes from Unity 6 (6000.6.8f1). It uses WebGPU where the browser has it and falls back to WebGL 2 where it does not. In Chrome on WebGPU, on a Mac, it runs at about 59 FPS.
The download is about 42 MB: 33.5 MB of data and 10.7 MB of wasm. Files are served gzipped, with an in-browser decompression fallback, so any static host works without special server headers.
Pick a World From the URL
All six worlds from the custom voxel engine post are selectable with ?world=<name>:
dusk-synthrural-canyonssky-islandssunken-coastfrozen-arcologyjungle-ruins
Two more flags work in the same query string. ?autoplay skips the Play gate. ?stats shows the stats overlay. They combine, for example ?world=sky-islands&autoplay&stats.
These are the same launch flags the desktop build takes on its command line. A small VoxelLaunchOptions layer in the shared library now reads them from the page URL as well. It is the first slice of shareable links, the item we listed as next in the Godot parity update.
A Custom Embed Page
Unity's default web template did not fit a page with several players on it, so we wrote our own embed page:
- A Play gate. Nothing downloads until it is pressed, so several embeds on one page are fine.
- A progress bar while the build loads.
- Errors shown in the page instead of only in the console.
- A capped pixel ratio, so high-density screens do not render more pixels than they need.
- A fullscreen button.
Hashed File Names
Build files now carry a content hash in their names. The host can cache them forever, and a browser can never mix files from two different builds.
We hit exactly that mix. A stale cached build was paired with new files, and it looked like a wasm stack overflow. We spent time on the engine before finding that the browser was serving old files. Hashing the names ended it.
Touch Controls on Desktop
Desktop browsers report a touchscreen to Unity's web player, so the touch controls were showing on desktop. They now appear on a mobile browser, or after the first real touch.
Where It Is Hosted
The player is on GitHub Pages at drawcode.github.io/game-drawlabs-dusk-synth-play, with the page itself at play/index.html. Each build is also published as a release asset.
What Comes Next
- Much smaller audio. Audio is about 26.5 MB of the 42 MB today, mostly long stem recordings. We plan to replace them with short one-shots and loop cells that are sequenced at runtime.
- Per-world downloads. Load only the world you picked.
- Phone testing. The touch controls are in, but we have not tested them on phones yet.
Progress on all of this is tracked in the Dusk Synth lab.