Skip to main content
OpenGame hosts the Wasm folder that Unreal Engine 5.9 packages for the web: index.html, the wasm-*.js page scripts, the game’s .js and .wasm under <Project>/Binaries/Wasm, the .pak, .utoc and .ucas containers, and the Brotli copies Unreal writes next to them. The game runs in WebAssembly with threads and renders with WebGPU. The Wasm platform is new in Unreal Engine 5.9 and Epic calls it experimental. Epic’s notes in your engine, Engine/Platforms/Wasm/Docs/GettingStarted.md, list what the platform needs: a C++ project, the Emscripten version the engine requires, and on a Mac or Linux an engine built from source. Epic’s licence terms, royalties included, apply to a game you publish here as they do on any other site.

Package the game

  1. Set up Emscripten as GettingStarted.md says, and check it under Platforms > Wasm in the editor.
  2. In Project Settings > Packaging, set Build Configuration to Shipping.
  3. Choose Platforms > Wasm > Package Project, and pick a Build folder in your project as the output. Unreal writes the package into Build/Wasm.
  4. Deploy Build/Wasm as Unreal wrote it, with all the .br copies. Don’t replace a single file: the package’s manifests list each file’s size and hash.
Inject isolation headers in Project Settings > Platforms > Wasm is for hosts that cannot send headers. OpenGame sends them, so leave it on or off.

Deploy

From the project folder, where the .uproject is:
init detects Unreal from the .uproject, sets build.output to Build/Wasm, and adds "requires": { "renderer": "webgpu" } to opengame.json, so a player with no WebGPU in the browser gets a message before the game loads. Package again before each deploy, because the CLI does not run Unreal. Run from inside Build/Wasm instead and init names the engine from the package. Export and deploy covers each step and opengame submit.

What the package needs from the browser

  • WebGPU. Chrome and Edge 133 or later, Firefox 141 or later on Windows, and Safari on iOS 26 or macOS 26. Unreal’s page shows a message in a browser without it.
  • Threads. A Wasm package always uses threads. The scan finds them and serves the release cross-origin isolated, so you change nothing. A private preview of a threaded game plays only in Chrome or Edge 137 or later, which isolate the game’s frame by themselves. Firefox and Safari need the page around the frame isolated too, which OpenGame does on the published game page. Threads and WebGPU shows how to check the frame.
  • Unreal’s service worker runs. Unreal’s sw.js keeps the game’s files in the browser, so the engine reads the level from there on a return visit instead of over the network. Keep it in the package. OpenGame removes it when the game is taken down or a new version is published, and the page itself always loads from OpenGame. Service workers has the rules.

Size

An upload can be up to 4 GiB, with any one file up to 1 GiB. A Third Person template packaged in Shipping is about 225 MB unpacked, most of it a 140 MB .wasm that downloads as a 26 MB Brotli copy. opengame check reports size-warn above 50 MiB unpacked, because a player waits for the boot download before the first frame. Unreal loads the .ucas containers in pieces as the game needs them, so a level’s assets stream in during play. A game over the archive limit can send large files separately: upload a large game explains how. opengame check reports boot-download when the module takes more than 3 s on a 50 Mbps connection. The .pak and .ucas containers are read by range as the level asks, so they are not counted. Package in Shipping, and keep the startup map small: the engine loads it before the first frame.

Connect the SDK

OpenGame adds the SDK to threaded builds, so a Wasm package’s page has window.OpenGame without any change. Call it from C++ with Emscripten’s MAIN_THREAD_EM_ASM, which runs the JavaScript on the page’s thread, from any Unreal thread, and waits until it has run:
OpenGameCalls.h
Call OpenGameReady() once the first level is on screen, for example from your game mode’s BeginPlay. The call waits for the page to read the string, so a temporary such as TCHAR_TO_UTF8(*BoardName) works when you write it inside the argument list. Don’t switch a call that passes a string to MAIN_THREAD_ASYNC_EM_ASM: that returns at once, and the string can be freed before the page reads it. These calls return nothing to C++. To read results such as the player or a leaderboard’s top scores, call the SDK in JavaScript and pass the answer to the game. Platform services lists the calls.

In the player

The player loads your index.html in a frame on the game’s address. Unreal’s page sizes the canvas from the window, so it follows the frame in and out of fullscreen.
  • Mouse look. Unreal’s page takes pointer lock on a click in the canvas when the game wants high-precision mouse input, which the frame allows.
  • Sound. A browser pauses audio a game opens before the first press. The player starts it when the person presses Play, or presses a key or the screen in the game.
  • Keyboard and gamepads. The game gets keys once it has focus. The player focuses it when it opens, and a click in the game focuses it again.

Common findings

opengame check leaves out index.html.br, because OpenGame serves a page uncompressed.