ℹ️ Needs Yop2D version 1300 or newer (the last number of the version, for example 1.0.1300). If your version is older, update Yop2D.
Since version 1300, Yop2D can create a web game: your whole game (images, sounds, nodes) fits in a single .html file. This file plays in a browser (Chrome recommended) on a phone, tablet or computer, with nothing to install and no internet.
- Yop2D version 1300 or newer;
- a game that works when you test it with ▶ in the editor;
- the Chrome browser on the device that will play (recommended).
Step 1: create the file
- On the start screen, tap your project to select it.
- Tap Build APK. A Create the game window opens.
- Choose Web game (HTML).
- Choose where to save the file (for example Downloads), then wait for the message “Your web game is ready!”.
Step 2: play
- Open the file with Chrome (file manager → Downloads → tap the file → Chrome).
- The game starts. Tap the screen once: sound and full screen turn on.
- On a computer you play with the mouse; the Esc key works like the phone's back button.
Step 3: share your game
- With a friend: just send the .html file (email, messaging, USB stick). They don't need Yop2D.
- On itch.io: rename the file index.html, put it in a .zip file, upload that zip to your itch.io page and tick “This file will be played in the browser”. Your game then plays right on the page.
- Your game stays yours: no Yop2D logo, no ads, you can give it away or sell it.
What works in the web game
The web game reads the same nodes as the Android app: physics, lights, particles, screen filters, transitions, tiles, prefabs, joysticks, behaviors, tower defense, turn-based games, choice stories with saves, gallery and player settings… Saves (“Save variables”, the 💾 slots of a story) are kept in the device's browser: they are still there when you close and reopen the game.
If it doesn't work
- No “Web game (HTML)” choice: your Yop2D is older than version 1300: update it.
- White screen or nothing moves: open the file with Chrome, not with a file viewer.
- No sound: tap the screen once (browsers wait for a first touch). On iPhone and iPad some sounds may not play: this case has not been checked yet.
- The save is gone: it is erased if the browser data is cleared; it also doesn't exist in another browser or on another device.
- Something works differently from the app: the web game is new. Tell us on Discord with the node's name: we fix it quickly.