# Manifest Reference

Every field of glint.json version 1: type, whether it's required, allowed values, defaults, examples, and how Glint and the validator use it.

`glint.json` describes your game to Glint: its name and version, engine, display and inputs, multiplayer settings and the browser features it needs. This page documents every field of version 1. The JSON Schema is published at [https://glint.joinfoundry.xyz/schemas/glint-manifest-v1.json](https://glint.joinfoundry.xyz/schemas/glint-manifest-v1.json).

## Where the File Goes

Put `glint.json` at the top level of the build, next to `index.html`. Glint reads it when you upload a build; the file can be up to 64 KB. A build without one still uploads, but `glint validate` warns ([GL002](https://joinfoundry.xyz/help/developers/glint-sdk-cli#gl002)).

Add `$schema` so your editor can check and complete the file as you type:

```json
{
  "$schema": "https://glint.joinfoundry.xyz/schemas/glint-manifest-v1.json",
  "schemaVersion": 1,
  "name": "My Game",
  "version": "1.0.0"
}
```

That is the smallest valid manifest. Every other field is optional and has a default.

## Full Example

The manifest from the `multiplayer-ts` starter:

```json
{
  "$schema": "https://glint.joinfoundry.xyz/schemas/glint-manifest-v1.json",
  "schemaVersion": 1,
  "name": "Glint Multiplayer Arena",
  "version": "1.0.0",
  "entry": "index.html",
  "engine": "vanilla",
  "display": {
    "orientation": "landscape",
    "aspectRatio": "16:9",
    "backgroundColor": "#0b0a1a",
    "fullscreen": true
  },
  "inputs": {
    "supported": ["keyboard", "mouse", "gamepad", "touch"],
    "primary": "keyboard",
    "touchPlayable": true
  },
  "multiplayer": {
    "local": {
      "enabled": true,
      "minPlayers": 1,
      "maxPlayers": 4,
      "mode": "same_screen"
    },
    "online": {
      "enabled": true,
      "minPlayers": 2,
      "maxPlayers": 8,
      "model": "realtime",
      "allowJoinInProgress": true,
      "allowSpectators": true,
      "matchmaking": "both"
    }
  },
  "capabilities": {
    "threads": false,
    "pointerLock": false,
    "webgl2": false,
    "webgpu": false
  },
  "sdk": {
    "features": ["multiplayer"]
  }
}
```

## Top-Level Fields

| Field | Type | Required | Allowed values | Default |
| --- | --- | --- | --- | --- |
| `$schema` | string (URL) | No | `https://glint.joinfoundry.xyz/schemas/glint-manifest-v1.json` | None |
| `schemaVersion` | number | Yes | `1` | None |
| `name` | string | Yes | 2 to 120 characters | None |
| `version` | string | Yes | Semantic version: `1.0.0`, or with a pre-release tag like `1.2.0-beta.1` | None |
| `entry` | string | No | `"index.html"` only | `"index.html"` |
| `engine` | string | No | `vanilla`, `phaser`, `threejs`, `pixijs`, `kaplay`, `babylon`, `unity`, `godot`, `gamemaker`, `defold`, `wasm`, `other` | `"vanilla"` |
| `display` | object | No | See [display](#display) | All defaults |
| `inputs` | object | No | See [inputs](#inputs) | All defaults |
| `multiplayer` | object | No | See [multiplayer](#multiplayer) | None |
| `capabilities` | object | No | See [capabilities](#capabilities) | All `false` |
| `sdk` | object | No | See [sdk](#sdk) | `{ "features": [] }` |

No other top-level fields are allowed. `version` takes three numbers separated by dots and an optional `-` tag of letters, digits, dots and hyphens; build metadata such as `+build.5` isn't accepted.

## display

| Field | Type | Allowed values | Default |
| --- | --- | --- | --- |
| `orientation` | string | `landscape`, `portrait`, `any` | `"landscape"` |
| `aspectRatio` | string | `16:9`, `4:3`, `9:16`, `free` | `"16:9"` |
| `backgroundColor` | string | A 6-digit hex color such as `#0b0a1a` | `"#0b0e14"` |
| `fullscreen` | boolean | `true` or `false` | `true` |

## inputs

| Field | Type | Allowed values | Default |
| --- | --- | --- | --- |
| `supported` | array of strings | 1 to 4 of `keyboard`, `mouse`, `gamepad`, `touch` | `["keyboard"]` |
| `primary` | string | One of `keyboard`, `mouse`, `gamepad`, `touch` | `"keyboard"` |
| `touchPlayable` | boolean | `true` if the game is fully playable by touch | `false` |
| `mobileOptimized` | boolean | `true` when the game works well on phone screens with touch controls. It stays playable on desktop. Adds the **Optimized for Mobile** tag on Glint. | Falls back to `touchPlayable` on draft uploads |
| `gamepad` | object | Optional controller setup and default remappable actions (see `inputs.gamepad` below) | None |

### inputs.gamepad

Declare named controller actions to show your default controls on the game page. Players can rebind them in the game or in the **Controller** section of Glint Account.

| Field | Type | Allowed values | Default |
| --- | --- | --- | --- |
| `enabled` | boolean | `true` or `false`. `true` adds Controller to the game's controls. | `true` |
| `deadzone` | number | `0` to `0.5` | `0.15` |
| `actions` | array of objects | Up to 32 unique actions (`id`, `label`, optional `kind`: `button` / `trigger` / `axis2d`, `default`, optional `description`) | `[]` |

Valid `default` targets are `south`, `east`, `west`, `north`, `lb`, `rb`, `lt`, `rt`, `select`, `start`, `l3`, `r3`, `dpad_up`, `dpad_down`, `dpad_left`, `dpad_right`, `left_stick`, `right_stick`, and `dpad`.

```json
"inputs": {
  "supported": ["keyboard", "gamepad"],
  "primary": "gamepad",
  "gamepad": {
    "enabled": true,
    "deadzone": 0.15,
    "actions": [
      { "id": "move", "label": "Move", "kind": "axis2d", "default": "left_stick" },
      { "id": "jump", "label": "Jump", "kind": "button", "default": "south" },
      { "id": "boost", "label": "Boost", "kind": "trigger", "default": "rt" }
    ]
  }
}
```

## multiplayer

The `multiplayer` object has two optional parts, `local` and `online`. Leave the whole object out for a single-player game.

### multiplayer.local

Players sharing one device, for example with several gamepads. Read connected pads with [Local Gamepads](https://joinfoundry.xyz/help/developers/glint-sdk-api#local-gamepads).

| Field | Type | Allowed values | Default |
| --- | --- | --- | --- |
| `enabled` | boolean | `true` or `false` | `false` |
| `minPlayers` | integer | 1 to 16 | `1` |
| `maxPlayers` | integer | 2 to 16 | `4` |
| `mode` | string | `same_screen`, `split_screen`, `pass_and_play` | `"same_screen"` |

### multiplayer.online

Online rooms through `sdk.multiplayer`. Set `enabled` to `true` whenever your game calls the multiplayer API.

| Field | Type | Allowed values | Default |
| --- | --- | --- | --- |
| `enabled` | boolean | `true` or `false` | `false` |
| `minPlayers` | integer | 2 to 16, no more than `maxPlayers` | `2` |
| `maxPlayers` | integer | 2 to 16 | `8` |
| `model` | string | `turn_based`, `realtime` | `"realtime"` |
| `allowJoinInProgress` | boolean | `true` or `false` | `false` |
| `allowSpectators` | boolean | `true` or `false` | `true` |
| `matchmaking` | string | `invite_only`, `public`, `both` | `"both"` |

When a game creates a room without setting `maxPlayers` or `allowSpectators`, Glint uses the values from `multiplayer.online`. With `enabled: true`, the validator also treats a missing SDK integration as an error ([GL013](https://joinfoundry.xyz/help/developers/glint-sdk-cli#gl013)) and warns if no `room.onHostChange` handler is found ([GL014](https://joinfoundry.xyz/help/developers/glint-sdk-cli#gl014)).

## capabilities

| Field | Type | Meaning | Default |
| --- | --- | --- | --- |
| `threads` | boolean | The game needs `SharedArrayBuffer` or multithreaded WebAssembly. Turns on [advanced mode](https://joinfoundry.xyz/help/developers/glint-sdk-platform-rules#advanced-mode-for-threads): cross-origin isolation headers and a full-screen player. | `false` |
| `pointerLock` | boolean | The game uses pointer lock. | `false` |
| `webgl2` | boolean | The game uses WebGL 2. | `false` |
| `webgpu` | boolean | The game uses WebGPU. | `false` |

Keep `threads` set to `false` unless the game can't run without threads. The validator checks it against your code ([GL012](https://joinfoundry.xyz/help/developers/glint-sdk-cli#gl012)), and `glint preview` turns on the isolation headers when it's `true`.

## sdk

| Field | Type | Allowed values | Default |
| --- | --- | --- | --- |
| `features` | array of strings | Up to 5 of `saves`, `achievements`, `leaderboards`, `multiplayer`, `input` | `[]` |
| `devMock` | object | See below | None |

`devMock` lists the achievement and leaderboard keys you use during development:

| Field | Type | Allowed values |
| --- | --- | --- |
| `devMock.achievements` | array of strings | Up to 100 keys |
| `devMock.leaderboards` | array of strings | Up to 20 keys |

Each key starts with a lowercase letter or digit and has up to 64 lowercase letters, digits, hyphens or underscores, the same format as keys in Glint Studio. The Local Emulator accepts any key whether or not it's listed here; on Glint, a key works only after you define it in Glint Studio. See [Achievements and Leaderboards](https://joinfoundry.xyz/help/glint/achievements-and-leaderboards).

```json
{
  "sdk": {
    "features": ["saves", "achievements", "leaderboards"],
    "devMock": {
      "achievements": ["first_win", "speedrun"],
      "leaderboards": ["high_score"]
    }
  }
}
```

## How Glint Uses the Manifest

- **On upload.** Glint validates `glint.json` while it checks a new build. An invalid manifest fails the upload with the reason, for example `glint.json is invalid: ...`, and the current build keeps playing.
- **Game settings.** For a game that hasn't been published yet, each new build's manifest sets the game's controls (`keyboard` and `mouse` become Keyboard, `gamepad` or `inputs.gamepad.enabled: true` becomes Controller, `touch` or `touchPlayable: true` becomes Touch), its orientation from `display.orientation`, its **Optimized for Mobile** tag from `inputs.mobileOptimized` (falling back to `touchPlayable`), and the advanced flag from `capabilities.threads`. After publishing, change these in Glint Studio. A demo build's manifest doesn't change them. **Mobile Only** isn't part of the manifest. Choose it under **Where It Plays** in Glint Studio.
- **Controller mapping.** Declared `inputs.gamepad.actions` appear under Controls on the game page and in Glint's in-game controller remapper.
- **Rooms.** `multiplayer.online.maxPlayers` and `allowSpectators` are the defaults for rooms your game creates.
- **Everything else** is validated and stored with the build.

## Validation in the CLI and on Glint

Glint checks the whole manifest against the schema and rejects unknown fields at every level, including inside `display`, `inputs`, `multiplayer`, `capabilities` and `sdk`. The validator is lighter. It checks:

- that the file is valid JSON and a JSON object;
- that every top-level field is a known one;
- `schemaVersion`, `name`, `version`, `entry` and `engine`;
- `display.orientation` and `display.aspectRatio`;
- `inputs.mobileOptimized` (must be a boolean if set);
- `inputs.gamepad` (`deadzone`, unique action IDs, labels, kinds, and valid default targets);
- `multiplayer.online.minPlayers` and `maxPlayers` when online play is enabled.

Problems show as [GL002](https://joinfoundry.xyz/help/developers/glint-sdk-cli#gl002). A manifest can pass the validator and still fail on Glint, for example with a misspelled field inside `display`, so keep `$schema` in the file and let your editor check the rest.
