> For the complete documentation index, see [llms.txt](https://studio-docs.sandbox.game/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://studio-docs.sandbox.game/the-editor/mobile-development.md).

# Mobile development

Optimize your game for phones and tablets, then give players touch controls. Playing a published game already works in a mobile browser. This page is the creator side: assets, testing, and sticks plus buttons.

### Step 1: Optimize your assets

Minimize the resource load of your project to prevent performance bottlenecks on mobile hardware.

1. Reduce texture sizes. Keep logical `.png` or `.jpg` paths in code and in materials. Turn on the Asset Compiler in Project Settings so compression runs at build or Play — you do not need to convert every file to WebP by hand. Manual WebP is only for shrinking source files on disk before import. See [How to use the asset compiler](/the-editor/how-to-use-asset-compiler.md).
2. Rotate and scale existing assets to create unique variations without increasing the total resource count.
3. For large numbers of the same prop (trees, rocks, grass), use an **Instanced Model Mesh Node** (`ENGINE.InstancedModelMeshNode`) instead of placing separate copies. See [How to instance repeated meshes](/the-editor/how-to-instance-repeated-meshes.md).

![The result after completing Step 1](https://2877193296-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWgFjStdWWXj1Wc6xnrcJ%2Fuploads%2FDbO6aJ1uTot4nWcNmgm4%2Fimage.png?alt=media\&token=6b60a31b-f8d6-4709-a723-161a7618f1c4)

### Step 2: Test performance on mobile

Establish a frequent testing workflow to monitor how your game handles mobile browser environments.

1. Monitor the game speed and frame rate (FPS) regularly throughout the development process.
2. In the editor, use [Preview a Game on Mobile](/the-editor/preview-a-game-on-mobile.md): open the arrow beside Play, choose Play Mobile Preview, pick a device and orientation, and turn on touch emulation.
3. Export the game to generate a test link. On the home page, select the **Yours** tab. You do not need to publish the game to access this link. See [Uploading Your Project](/publishing/uploading-your-project.md).
4. Open and share the link across multiple browsers (Safari, Chrome) and devices (Android, iOS) to verify cross-platform compatibility.

{% hint style="info" %}
*TIP: If frame rate drops, review asset counts and texture sizes first.*
{% endhint %}

## Touch controls

On a phone, players move with on-screen sticks and tap buttons for jump, interact, or fire. Test this in [Preview a Game on Mobile](/the-editor/preview-a-game-on-mobile.md) with touch emulation on, then on a real device with the draft link.

### Step 3: Use the virtual joysticks

The input system already handles keyboard, mouse, gamepad, and touch. You do not write a separate mobile input stack.

Virtual joysticks are built in: a **left** stick for movement and a **right** stick for look or aim. They draw on-screen on touch devices. Stick input uses the same controller → pawn path as WASD (`moveForward` and look). A character that already walks with the keyboard walks with the sticks.

Character movement templates (for example 1st Person Movement, 3rd Person Movement, and FPS) already respond to those sticks on a phone. Empty and other templates without a movement pawn will not show a useful pair of sticks until you add a pawn that reads that input.

You can turn each stick on or off. Placement can stay in a fixed spot or appear where the thumb lands. To hide a stick, set it to disabled (`enabled: false`). Do not use a `hidden` option — that was removed.

Taps and swipes are recognized as input events as well.

### Step 4: Add on-screen action buttons

Jump, interact, and fire are not extra joystick features. Add `ENGINE.Button` widgets from the [Game UI Kit](/the-editor/game-ui-kit-widget-reference.md) and wire each one to the same pawn actions you already use on keyboard.

There is no separate engine “touch button” helper beyond `ENGINE.Button`. Auto-fire and aim-assist are game logic you write if you want them — they are not Project Settings toggles.

### What you've done

Assets are sized for mobile, you can preview with touch emulation and a draft link, and touch movement uses the built-in sticks (plus UI Kit buttons for jump and interact). Next, test another device profile on [Preview a Game on Mobile](/the-editor/preview-a-game-on-mobile.md), then a real phone with the unpublished link.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://studio-docs.sandbox.game/the-editor/mobile-development.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
