Browsers and Devices
- The player needs WebAssembly and WebGL 2. It targets desktop browsers. Touch input and phone layouts are not part of Web export, so test on real devices before you mention them on your game page.
- Browsers start sound only after the player clicks or presses a key in the game.
- Keyboard input goes to the game only while its page or embed has focus.
PHP
PHP in a Web build includes the core language and these extensions:
date, hash, json, pcre, random, spl, standard and uri.
- Other extensions are not available, even when your desktop build has
them. Examples include
mbstring,pdo,sqlite3,openssl,curl,fileinfoandzlib. Code that calls them fails in the browser. - Fibers are not available.
- Functions that start other programs, such as
execandproc_open, cannot work in a browser. Player mode also blocks them in exported games; see Player mode security and permissions. - Composer packages must be installed before you export, and they run with the same extensions.
Files and Saves
- A Web build reads game files only from its ZIP, plus the saves it writes. Files that scripts open by a name built at runtime must be listed in the dependency list; see Add files that scripts load by name.
- Saves and preferences live in the player's browser, for the site that serves the game. They do not follow players to another browser, device or domain, and clearing site data removes them. See Save progress in a Web build.
- Only one tab can save at a time. A second tab of the same game runs without saving.
Graphics and Physics
- Custom shaders must compile for WebGL 2. With Lenga 0.10.1 or later, a custom unlit 3D material can use the same sources on desktop and Web if its shader stages opt in and use GLSL features shared by the two targets. See Write portable shader stages.
- A Linear project's 16-bit float scene color target depends on the player's browser and device. Where it is refused, the game runs with an 8-bit target. See Post-processing in Web builds.
- 2D physics uses Box2D and 3D physics uses Jolt. Preflight stops a build whose physics settings choose another backend.
- Physics runs on one thread in the browser.