Web export works for 2D and 3D projects. 2D physics runs on Box2D and 3D physics on Jolt, the same engines your desktop build uses by default.
What You Need
- A Lenga installation that includes Web export. Open Project > Build & Export... and select the Web target. Export Summary shows Web tools available when your installation can build Web games.
- A project with at least one saved scene in Scenes in Build.
- A desktop browser with WebAssembly and WebGL 2 for testing. Current versions of Chrome, Firefox and Safari meet this.
How It Works
- Build & Export checks the project with Run Preflight: the startup scene, every file the game needs, imported assets, PHP scripts and physics settings.
- It writes a ZIP with four files:
index.html,lenga_runtime.js,lenga_runtime.wasmandlenga_runtime.data. The last one holds your game. - Build & Run opens that ZIP in your browser from a local address so you can play it before anyone else does.
- You upload the same ZIP to the site where players will find it.
Guides
- Export a Web build: choose a startup scene, check the project, make a ZIP and play it locally.
- Host a Web build: upload to itch.io or put the game on your own site, and test it there.
- Save progress in a Web build: keep settings and save files between visits.
- Web export reference: every control in the Web target, what preflight checks, and what goes into the ZIP.
- Web export limitations: what works differently in a browser, and what is not available there.
- Fix Web export problems: missing files, a blank page, silent audio and lost saves.
To build for the computer you are working on instead, see Export a current-platform build.