Skip to content

Mobile ​

Any game made with VERB can already be played with a finger in the browser of a phone or tablet, without the plugin (see On mobile): tapping points and acts when you lift your finger, holding it looks, small things are hit with half a finger of margin and, with the tab hidden, the game pauses.

The Mobile plugin lets you decide how this particular game plays on a phone. With a mouse nothing changes (unless you ask to test it with one).

It is not on by default: without the plugin, the game behaves as always.

Turning it on ​

  1. Open Plugins and choose Mobile (group Game interface).
  2. Turn on the Enabled switch.

The Mobile plugin page: touch, screen, performance, view and installable app

Touch ​

  • When it applies: Only with a finger (default) or Always, which lets you test it on the computer with the mouse: clicks behave like taps.
  • When tapping something:
    • Acts when you lift your finger (default).
    • Points first, the second tap acts: the first tap shows the name and the action sentence; the second, on the same thing, acts. Tapping the floor walks at once. It suits the verb bar, to see the sentence before confirming.
  • When holding the finger: The game's own (the “hold down” of Settings › Mouse and keyboard; if that is “run” or “nothing”, it looks), Look, Show the interactive points or Nothing (a long press is a normal tap).
  • Tapping the floor twice runs: yes by default (like a double click).
  • Vibration: it belongs to the game, not the plugin (it works without it). This page shows at the end, in From the game: vibration, the same settings as Settings → Mouse and keyboard → Vibration: changing them here changes them there.
  • On-screen button to change verb (only with the cycling verb, yes by default): with a mouse the verb is changed with the right button or the wheel; with a finger, a button at the bottom right showing the current verb changes it to the next one. If you turn it off, Diagnostics warns that the verb cannot be changed on a phone.

Screen ​

  • Interface size: Automatic (default): with a finger, the verb bar, the inventory and the buttons grow until the smallest one measures at least 44 real px on screen. When the phone is turned mid-game it is worked out again. You can also set a fixed scale (×1 to ×3).
  • Ask to turn the phone if it is upright: with the phone upright a notice says “Turn your phone sideways to play”; in landscape it goes away.
  • Keep the interface clear of the notch and corners (on by default): the ☰ button, the inventory and the verb bar move away from the phone's notch and rounded corners.

View: variable width ​

A landscape phone is more elongated than a 16:9 game: on its own, the game shows black bars at the sides. With Variable width, the game height stays and the width opens to fill the screen: you see more of the scene at the sides.

  • The game resolution is the safe zone. Everything needed to play (hotspots, exits, objects, characters) must be there, as always; the sides are extra. On the computer the game looks the same as before.
  • Where it opens: Only with a finger (default, phones and tablets) or Also on the computer (widescreen monitors).
  • Up to what ratio: the widest it opens (2:1, 21:9 by default or 2.4:1). Beyond that the bars come back. A 4:3 tablet is narrower than the game: it shows as always, with bars at the top and bottom.
  • Outside the scene: if a scene is narrower than what is seen, it is centered and the sides show Black, A color or The scene background, blurred.
  • In cinematics, only the safe zone (on by default): during a cinematic you see what was designed, with black bars at the sides.
  • The classic interface anchors to the screen edges (the ☰ at the top right of the phone, the verb bar from side to side). UI PRO views stay in the safe zone, centered; from them, Screen.ViewWidth tells how much is seen and Screen.SafeArea.Left/Right/Top/Bottom what the notch covers.
  • When the phone is turned, the view is recalculated on its own.

Bleed: scenes painted wider ​

So that a landscape phone shows real scenery and not fill, paint the scene wider than the game (for example 1600 px for a 1280 game) and mark how much of each edge is only scenery: the bleed. On the computer the camera stays in the playable part (it looks as always) and, with a wider screen, it also shows the scenery. In a scrolling scene, the bleed only limits how far the camera goes at the ends.

  • For every scene, on this page (Bleed of every scene); for one, in the Scene editor, the scene's sheet → Size and light → Bleed, which overrides the page's. The canvas shades it in purple.
  • Diagnostics warns about hotspots and objects that fall entirely in the bleed: they would not be seen on the computer.

Performance ​

It only applies with a finger:

  • Maximum drawing density: the game is drawn at most at ×2 by default (also ×1.5 or ×3, no limit). On a ×3 phone the difference is barely noticeable and it uses less battery.
  • Automatic quality with a finger (on by default): if the player has not chosen another one in Options, the graphics quality is Automatic: if the phone cannot keep up the frame rate, the resolution goes down by itself. A game with the “As it comes” quality keeps it.
  • Diagnostics warns about images larger than 4096 px on a side: some older iPhones do not load them (the scene would show without it).

Testing it in the editor ​

In Play, the Device selector shows the game in a frame of a phone in landscape (844×390), phone in portrait (390×844) or tablet (1024×768), and the game behaves as with a finger. The phones have their notch (and the game moves away from it). With variable width, the landscape phone shows the opened view. The choice is remembered (also after F5). Changing it restarts the game.

To test it on a real phone, export the game for the web and open it on the phone (upload it to your website or to itch.io). There is no QR code to open the project from the phone: projects live in the browser of the computer and the phone cannot reach them without a server.

In Logic ​

The Touch screen condition (“if playing on a touch screen”) lets you change a text or a hint depending on the device. It does not need the plugin. Test walkthroughs always take it as “no”, and Diagnostics reminds you: whatever is needed to finish the game must also be doable without a finger.

Minigames ​

Minigames played with the keyboard can have touch controls (d-pad, stick or buttons) that show over them when playing with a finger and press their keys; you set them in the minigame's sheet. Those played by tapping do not need them. From its code, VERB.device says whether it is played with a finger and on what screen. With the plugin on, Diagnostics warns about keyboard-only minigames without controls. All of this in Minigames › On mobile.

Installable app (PWA) ​

With Installable app (PWA) → Can be installed on the home screen, the web export is ready to be installed like an app (a PWA, Progressive Web App): the player adds it to the home screen and it opens full screen, without the browser bars, with its own icon and name.

  • Name and Short name (the one under the icon; best up to 12 letters). By default, the game title.
  • Icon: the game icon (the same as in Project), square and best 512×512 or larger. It is exported at 192, 512 and 180 px (the iPhone one). Without an icon, the initial of the title on the app colour. Deleting that image from Assets warns that it is in use.
  • App colour: the colour of the system bar and of the icon background on iPhone. By default, black.
  • Orientation: Landscape (default) opens the app in landscape and, on Android, locks full screen in landscape; Whatever the phone has lets it rotate.
  • Screen: Without the browser bars (default) or Full (on Android it also hides the system bar).

What goes in the zip: manifest.webmanifest, the icons and, in index.html, what Android and iPhone ask for (apple-mobile-web-app-capable, theme-color). Offline: once loaded, the game keeps itself in the browser (the export's service worker does it in the background) and the app opens and plays without a connection. On iPhone and iPad, the first time it is opened in Safari without installing it, the game shows a hint: “Add it to your Home Screen to play full screen and keep your saved games” (installed, Safari does not delete the data of a website that has not been used for a week). It shows only once.

Where it can be installed

The game has to be on your own website with https (GitHub Pages, Netlify, your domain). On itch.io the game runs inside one of their pages and cannot be installed. Nor with a double click on index.html. Without the installable app, the export is exactly the same as before.

With the AI agent ​

mobile_read reads the settings, explains each one and lists the keyboard-only minigames without controls (keyboardMinigames); set_plugin {id: "mobile", settings} changes them (touchWhen, touch {tap, hold, holdMs, doubleTapRun, cycleButton, vibrate}, perf {maxDpr, autoQuality}, ui {scale, minTouch, safeArea}, orientation, view {mode, maxAspect, expandOn, fill, bleed, cinematicsSafe}, webApp {enabled, name, shortName, themeColor, orientation, display}). The app icon is meta.icon (patch_project). A scene's bleed is read with read_scene and written with patch_project (bleed {left, right}). A minigame's controls are set with minigame_write {name, touchControls}.

Still missing ​

Anchoring UI PRO views to the screen edges with the variable width (today they stay centred in the safe zone; with Screen.ViewWidth and Screen.SafeArea in formulas you can take anything to the edge).