Since merging the initial Webassembly port of ScummVM, I have added a few critical improvements which moves the project forward torwards an eventual official release:

  • Dynamic Plugins: It’s now possible to dynamically load plugins, making it possible to bundle all engines without the binary growing into unreasonable sizes. This involved a few fixes in Emscripten to get working () - which haven’t been merged, so it’s manually patched in during the setup of the build environment.
  • General Build Improvements: The build script is now fully self-contained and can be run with Github actions, this includes automatic download of games/demos as well as generating the default scummvm.ini for a demo page. See on how a self-contained ScummVM demo is built (incl. bundled games).
  • ScummvmFS: I added a custom filesystem layer which in the future can be extended to support range requests and persisting downloaded data for offline usage - hopefully this can eventually replace which hasn’t seen any commits in 12+ months.

Additionally, a few minor quality of life improvements also made it in:

  • CLI arguments: It’s now possible to pass CLI arguments as a anchor link. In the build script this is used to bootstrap the initial scummvm.ini file by opening http://localhost:8080/scummvm.html#--add --path=/games --recursive in a headless browser.
  • HiDPI fix: SDL_GetDisplayDPI has been added to SDL for Emscripten - but this hasn’t been released yet so I switched to using an unreleased version of SDL during the setup of the build environment. Without it the all the UI fonts are broken/too small.
  • Parts of the rejected are added to the SDL backend for fullscreen support, no exit buttons and proper URL opening in this port.
  • Various Bugfixes:
    • DIRECTOR: Engine freezes as it doesn’t yield back to the browser.
    • STARK: Passing integer enums to glTexParameterf causes an error in WebGL when using this engine.
    • TESTBED: Crash as the engine tries to write into a read-only filesystem in Emscripten.
    • Gamepad API: There was a crash when opening the app on a non-secure context (i.e. HTTP instead of HTTPS) due to SDL wanting to use the Gamepad Web API and ScummVM crashing if it couldn’t instantiate the SDL Gamepad API, there’s now a redirect to HTTPS to avoid this issue.

For details on all of this, check out the following pull request that hopefully will get merged in the coming days:

DISTS: Updated Webassembly / Emscripten Port

This was a major piece of work for me as it also depended on multiple upstream fixes in SDL and Emscripten:

As mentioned not all of them are merged yet so I the build script patches them manually.

As before, the latest version is running at scummvm.kuendig.io (now automatically built with Github Actions, see the above mentioned .

With this contribution I now also officially joined the ScummVM Development team as the Webassembly / Emscripten maintainer - so you find my name now in the credits 😊.

Next steps

I think we’re really getting closer to making this official. I think there are two main roadblocks:

  • Replace BrowserFS with something better suited to our use case - preferably implemented in C++ and using the new Emscripten Filesystem backend ( )
  • Add support for cloud storage so users can import/export savegames.

And a few minor optimizations around asyncify/dynamic loading and random QoL improvements such as screenshot, logfile support. Maybe better error handling and loading animations would be nice as well.