Engines
What works as it is, what needs a setting, and what v1 does not support.
Any engine that exports a single-page web build without threads works. The constraints come from the frame: one document from start to end, no cross-origin isolation, and fullscreen through the SDK.
| Engine | In v1 |
|---|---|
| Phaser | Works as it is. |
| Construct 3 | Works as it is. |
| Plain HTML and JavaScript, Vite | Works as it is. |
| Godot 4.3 or later | Exported without threads. |
| Unity | Single-threaded WebGL, with fullscreen routed to the SDK. |
| Threaded builds (SharedArrayBuffer) | Not supported. |
| Multi-page games | Not supported. |
Without a bundler
Copy dist/uloggd-arcade.min.js from the package next to the engine's HTML
page, serve it with the game (see
Without a bundler in the SDK
reference), and load it before the engine:
<script src="./uloggd-arcade.min.js"></script>
<script>
window.uloggdArcade = UloggdArcade.createArcadeSDK({
appId: "YOUR_APP_ID",
});
window.uloggdArcade.ready().catch(() => {});
</script>UloggdArcade is the SDK; window.uloggdArcade is your game's connection,
which the sections below call. Both are classic scripts, so they run in order:
put them before the engine's loader, and the connection exists when the engine
starts.
Vite and plain JavaScript
The quick start uses a Vite project. If a build is served from a path rather than
the origin's root (see
immutable deployment URLs), set Vite's
base to "./" so the assets resolve beside the page. The proof file must
still be served at the origin's root.
Phaser
Phaser's own this.scale.startFullscreen() asks the browser for fullscreen
inside the frame, which is denied. Call the SDK from an input handler instead:
this.input.keyboard?.on("keydown-F", () => {
arcade.commands.requestFullscreen().catch(() => {});
});The RESIZE scale mode follows the frame's size; LAYOUT_UPDATE also gives
you the safe area.
Construct 3
Export with Web (HTML5). Load the SDK as above, and call
window.uloggdArcade from Construct's JavaScript scripting. The Browser
object's fullscreen request is denied inside the frame: route it to
requestFullscreen.
Godot 4
Godot 4.3 and later can export for the web without threads.
- In the Web export preset, turn Thread Support off. A threaded export needs cross-origin isolation, which uloggd's player does not provide.
- Leave Progressive Web App off. Its service worker exists to fake cross-origin isolation, and it would cache your build inside uloggd's storage.
- Load the SDK in a custom HTML shell, as above, and call it from GDScript
through
JavaScriptBridge. Route fullscreen to the SDK rather thanDisplayServer.window_set_mode:
func request_fullscreen() -> void:
JavaScriptBridge.eval("window.uloggdArcade && window.uloggdArcade.commands.requestFullscreen()")Unity
- Build for the Web (WebGL) platform without multithreading.
Screen.fullScreenasks the browser for fullscreen inside the frame, which is denied. Call the SDK from a.jslibplugin, with the SDK loaded aswindow.uloggdArcadein your WebGL template:
// Assets/Plugins/WebGL/UloggdArcade.jslib
mergeInto(LibraryManager.library, {
UloggdRequestFullscreen: function () {
if (window.uloggdArcade) window.uloggdArcade.commands.requestFullscreen();
},
});using System.Runtime.InteropServices;
public static class UloggdArcade
{
[DllImport("__Internal")]
public static extern void UloggdRequestFullscreen();
}- A compressed build needs its
.bror.gzfiles served with the matchingContent-Encoding, or Decompression Fallback turned on.
Not supported in v1
- Threads and SharedArrayBuffer. They need cross-origin isolation on uloggd's page, which v1 does not provide.
- Multi-page games, reloads and redirects. Any navigation of the frame ends the play.
- Popups, new tabs, downloads,
alertandconfirm. - Opening links. Planned for a later version of the SDK.
- Camera, microphone, geolocation, payments and WebAuthn.
- Locking the screen orientation. Declare the orientation the game needs in the release instead.