@indiegems/gem-web-sdk 10.3.1 → 10.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/game.d.ts +7 -1
- package/dist/gem-web-sdk.bridge.js +1 -1
- package/dist/gem-web-sdk.esm.js +1 -1
- package/dist/gem-web-sdk.function.js +1 -1
- package/dist/gem-web-sdk.game.js +2 -2
- package/dist/gem-web-sdk.min.js +2 -2
- package/dist/gem-web-sdk.quality.js +2 -0
- package/dist/gem-web-sdk.sdk.js +2 -2
- package/dist/gem-web-sdk.server.js +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/quality.d.ts +49 -0
- package/dist/sdk.d.ts +7 -1
- package/docs/api/api-reference-game.md +59 -3
- package/docs/api/api-reference-server.md +1 -1
- package/docs/api/reference.json +66 -2
- package/docs/changelog.md +14 -0
- package/docs/getting-started.md +1 -1
- package/docs/manifest.json +8 -8
- package/docs/server-bundles.md +2 -2
- package/docs/what-a-game-must-do.md +69 -2
- package/package.json +5 -1
- package/schema/bridge.v1.json +37 -1
package/docs/api/reference.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"schema_version": 2,
|
|
3
3
|
"source": {
|
|
4
4
|
"repo": "IndieGems/gem-web-sdk",
|
|
5
|
-
"version": "10.
|
|
5
|
+
"version": "10.4.0"
|
|
6
6
|
},
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
@@ -8702,7 +8702,7 @@
|
|
|
8702
8702
|
"group": "player",
|
|
8703
8703
|
"signature": "readonly recommended: GemRecommendedSettings | null",
|
|
8704
8704
|
"documented": true,
|
|
8705
|
-
"summary": "The player's Arcade-wide defaults for this device — a volume, battery\nsaver, a keyboard layout, the gamepad's confirm button, vibration,
|
|
8705
|
+
"summary": "The player's Arcade-wide defaults for this device — a volume, battery\nsaver, a keyboard layout, the gamepad's confirm button, vibration, the\ncamera and controls settings (look sensitivity, gamepad look sensitivity,\ninvert look, touch movement) and a starting graphics quality — or `null`\nwhen the Arcade did not send them.\n\n**Recommendations only; the player's own choice in your game wins.** Start\na setting from here while the player has made no choice of their own for\nit, and never overwrite one they made because this changed:\n\n```js\nconst saved = gem.deviceSettings.current ?? {};\nconst volume = saved.volume ?? gem.prefs?.recommended?.volume ?? 100;\n```\n\nUnlike `muted` and `reducedMotion`, nothing here is applied for you, and\nnothing obliges you to use it. See the guide's \"Game settings\" section.",
|
|
8706
8706
|
"deprecated": null,
|
|
8707
8707
|
"params": [],
|
|
8708
8708
|
"returns": null,
|
|
@@ -8876,6 +8876,38 @@
|
|
|
8876
8876
|
"defaultValue": null,
|
|
8877
8877
|
"guides": []
|
|
8878
8878
|
},
|
|
8879
|
+
{
|
|
8880
|
+
"id": "GemRecommendedSettings.graphicsQuality",
|
|
8881
|
+
"name": "graphicsQuality",
|
|
8882
|
+
"anchor": "gemrecommendedsettings-graphicsquality",
|
|
8883
|
+
"group": "player",
|
|
8884
|
+
"signature": "readonly graphicsQuality: GemGraphicsQuality",
|
|
8885
|
+
"documented": true,
|
|
8886
|
+
"summary": "The graphics quality to START at on this device: `'low'`, `'medium'` or\n`'high'`. The Arcade picks it per device — the tier it detected, or the\nplayer's own Graphics choice — so a game opens at a quality that suits the\ndevice instead of guessing. A starting point, not a cap: while\n`graphicsQualityAuto` is true your game may adapt from here as it runs,\nand `createQualityGovernor` from `@indiegems/gem-web-sdk/quality` does\nthat for you. When the Arcade did not say, `'low'` with `batterySaver`\non and `'medium'` otherwise.",
|
|
8887
|
+
"deprecated": null,
|
|
8888
|
+
"params": [],
|
|
8889
|
+
"returns": null,
|
|
8890
|
+
"throws": null,
|
|
8891
|
+
"example": null,
|
|
8892
|
+
"defaultValue": null,
|
|
8893
|
+
"guides": []
|
|
8894
|
+
},
|
|
8895
|
+
{
|
|
8896
|
+
"id": "GemRecommendedSettings.graphicsQualityAuto",
|
|
8897
|
+
"name": "graphicsQualityAuto",
|
|
8898
|
+
"anchor": "gemrecommendedsettings-graphicsqualityauto",
|
|
8899
|
+
"group": "player",
|
|
8900
|
+
"signature": "readonly graphicsQualityAuto: boolean",
|
|
8901
|
+
"documented": true,
|
|
8902
|
+
"summary": "Whether the Arcade chose `graphicsQuality` for this device (`true`, the\nplayer left Graphics on Auto) or the player picked it by hand (`false`).\nWhile it is `false`, hold that quality: never step it down or up on your\nown. `true` when the Arcade did not say.",
|
|
8903
|
+
"deprecated": null,
|
|
8904
|
+
"params": [],
|
|
8905
|
+
"returns": null,
|
|
8906
|
+
"throws": null,
|
|
8907
|
+
"example": null,
|
|
8908
|
+
"defaultValue": null,
|
|
8909
|
+
"guides": []
|
|
8910
|
+
},
|
|
8879
8911
|
{
|
|
8880
8912
|
"id": "GemCohort",
|
|
8881
8913
|
"name": "GemCohort",
|
|
@@ -9949,6 +9981,22 @@
|
|
|
9949
9981
|
"defaultValue": null,
|
|
9950
9982
|
"guides": []
|
|
9951
9983
|
},
|
|
9984
|
+
{
|
|
9985
|
+
"id": "Gem.paused",
|
|
9986
|
+
"name": "paused",
|
|
9987
|
+
"anchor": "gem-paused",
|
|
9988
|
+
"group": "start",
|
|
9989
|
+
"signature": "readonly paused: boolean",
|
|
9990
|
+
"documented": true,
|
|
9991
|
+
"summary": "Whether the arcade has your game paused right now: `true` from an\n`onPause(true)` until the `onPause(false)` that follows it, `false` before\nany. The same pause `onPause` tells you about, readable at any moment —\nfor code that was not around when the edge arrived, such as a frame-time\nmonitor deciding whether a slow frame counts.",
|
|
9992
|
+
"deprecated": null,
|
|
9993
|
+
"params": [],
|
|
9994
|
+
"returns": null,
|
|
9995
|
+
"throws": null,
|
|
9996
|
+
"example": null,
|
|
9997
|
+
"defaultValue": null,
|
|
9998
|
+
"guides": []
|
|
9999
|
+
},
|
|
9952
10000
|
{
|
|
9953
10001
|
"id": "Gem.cohorts",
|
|
9954
10002
|
"name": "cohorts",
|
|
@@ -12778,6 +12826,22 @@
|
|
|
12778
12826
|
"defaultValue": null,
|
|
12779
12827
|
"guides": []
|
|
12780
12828
|
},
|
|
12829
|
+
{
|
|
12830
|
+
"id": "GemGraphicsQuality",
|
|
12831
|
+
"name": "GemGraphicsQuality",
|
|
12832
|
+
"anchor": "gemgraphicsquality",
|
|
12833
|
+
"group": "player",
|
|
12834
|
+
"signature": "type GemGraphicsQuality = \"low\" | \"medium\" | \"high\"",
|
|
12835
|
+
"documented": true,
|
|
12836
|
+
"summary": "A graphics quality tier: `'low'`, `'medium'` or `'high'`. What\n`gem.prefs.recommended.graphicsQuality` holds.",
|
|
12837
|
+
"deprecated": null,
|
|
12838
|
+
"params": [],
|
|
12839
|
+
"returns": null,
|
|
12840
|
+
"throws": null,
|
|
12841
|
+
"example": null,
|
|
12842
|
+
"defaultValue": null,
|
|
12843
|
+
"guides": []
|
|
12844
|
+
},
|
|
12781
12845
|
{
|
|
12782
12846
|
"id": "ServerTokenGrant",
|
|
12783
12847
|
"name": "ServerTokenGrant",
|
package/docs/changelog.md
CHANGED
|
@@ -16,6 +16,20 @@ Its entries are grouped under up to five headings:
|
|
|
16
16
|
- **Rebuild**: a type changed. Recompile against the new version; code that compiles today keeps compiling unless the entry says otherwise.
|
|
17
17
|
- **New capability**: something a game can now do. Nothing changes unless you use it.
|
|
18
18
|
|
|
19
|
+
## 10.4.0
|
|
20
|
+
|
|
21
|
+
Upgrading from 10.3.1. Impact: required.
|
|
22
|
+
|
|
23
|
+
### Rebuild
|
|
24
|
+
|
|
25
|
+
- The recommended preferences type gained optional graphics quality and automatic fields, and the host method that sends preferences accepts the same two fields. Existing code keeps working; recompile your game against the new types. Host or test-harness code that sends preferences can now also pass the graphics quality tier and the automatic flag.
|
|
26
|
+
|
|
27
|
+
### New capability
|
|
28
|
+
|
|
29
|
+
- The recommended settings now carry a graphics quality tier and an automatic flag. The Arcade picks a starting tier per device (low, medium or high) and a game can start from it. An unknown tier is read as medium, a missing tier follows the battery saver setting (low when it is on, otherwise medium), and a missing automatic flag is read as true, so both values are always present in the game. When the automatic flag is false the player picked the tier by hand, and the game should keep it rather than adapt it.
|
|
30
|
+
- The new paused value holds the latest state of the pause signal. Code that starts after the pause signal has already arrived, such as a frame-time monitor created mid-game, can read it to learn whether the game is currently paused.
|
|
31
|
+
- A new optional quality entry point lets a game adapt its graphics level to frame time. It starts at the Arcade's tier mapped onto the game's own levels. It steps down one level after about two seconds of slow frames and up one level after about ten seconds of comfortably fast frames, never going above one level over its start. It ignores paused and hidden time, holds steady when the player chose the tier by hand, and restarts when a new recommendation arrives. It can run on animation frames or be fed frame times manually. A game that does not import it pays nothing in size.
|
|
32
|
+
|
|
19
33
|
## 10.3.1
|
|
20
34
|
|
|
21
35
|
Upgrading from 10.3.0. Impact: none.
|
package/docs/getting-started.md
CHANGED
package/docs/manifest.json
CHANGED
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
"file": "changelog.md",
|
|
36
|
-
"sha256": "
|
|
37
|
-
"updated": "2026-10-11T19:
|
|
36
|
+
"sha256": "fd69a4c08141e0646d695adedce0d313de2295cfd6bc656433ce33dd02ec731a",
|
|
37
|
+
"updated": "2026-10-11T19:38:28Z"
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
"file": "cross-promotion.md",
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
70
|
"file": "getting-started.md",
|
|
71
|
-
"sha256": "
|
|
72
|
-
"updated": "2026-10-11T19:
|
|
71
|
+
"sha256": "f2c13478823888b777058bbdc4de41216dd8b48d7e7efab3a31334f980d647ec",
|
|
72
|
+
"updated": "2026-10-11T19:38:28Z"
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
75
|
"file": "inventory-and-catalogs.md",
|
|
@@ -123,8 +123,8 @@
|
|
|
123
123
|
},
|
|
124
124
|
{
|
|
125
125
|
"file": "server-bundles.md",
|
|
126
|
-
"sha256": "
|
|
127
|
-
"updated": "2026-10-11T19:
|
|
126
|
+
"sha256": "04bb5fb5f631a52c7962728a74602ce7eec6ee6a1a3efa6197542ce5aa4cce95",
|
|
127
|
+
"updated": "2026-10-11T19:38:28Z"
|
|
128
128
|
},
|
|
129
129
|
{
|
|
130
130
|
"file": "serverless-functions-js.md",
|
|
@@ -148,8 +148,8 @@
|
|
|
148
148
|
},
|
|
149
149
|
{
|
|
150
150
|
"file": "what-a-game-must-do.md",
|
|
151
|
-
"sha256": "
|
|
152
|
-
"updated": "2026-10-
|
|
151
|
+
"sha256": "ce2abba4b32ee1c0dd69eabaaac1f33e2534ac5b58e9a45c4f8a7b3bd3e11f27",
|
|
152
|
+
"updated": "2026-10-11T19:25:48Z"
|
|
153
153
|
}
|
|
154
154
|
]
|
|
155
155
|
}
|
package/docs/server-bundles.md
CHANGED
|
@@ -80,8 +80,8 @@ To check the download yourself: the package npm serves is, byte for byte, the fi
|
|
|
80
80
|
also publishes on its download host, with the hash beside it:
|
|
81
81
|
|
|
82
82
|
```bash
|
|
83
|
-
curl -fsSL -O https://downloads.gemarcade.com/sdk/v10.
|
|
84
|
-
curl -fsSL https://downloads.gemarcade.com/sdk/v10.
|
|
83
|
+
curl -fsSL -O https://downloads.gemarcade.com/sdk/v10.4.0/gem-web-sdk.tgz
|
|
84
|
+
curl -fsSL https://downloads.gemarcade.com/sdk/v10.4.0/gem-web-sdk.tgz.sri
|
|
85
85
|
openssl dgst -sha384 -binary gem-web-sdk.tgz | openssl base64 -A
|
|
86
86
|
```
|
|
87
87
|
|
|
@@ -924,12 +924,18 @@ same push as `muted` and `reducedMotion`, and again whenever the player changes
|
|
|
924
924
|
| `gamepadLookSensitivity` | `20` to `400` | Look speed for a gamepad stick, as a percentage: `100` is 1×. |
|
|
925
925
|
| `invertLookY` | `true` / `false` | Up/down look inverted: pushing up or dragging up looks down. Pitch only, never yaw. |
|
|
926
926
|
| `touchMovement` | `'floating'` / `'fixed'` | On a touch screen, a movement stick that appears where the thumb lands, or one fixed in place. |
|
|
927
|
+
| `graphicsQuality` | `'low'` / `'medium'` / `'high'` | The graphics quality to start at on this device. |
|
|
928
|
+
| `graphicsQualityAuto` | `true` / `false` | `true`: the Arcade picked that tier for this device, so you may adapt from it. `false`: the player picked it, so hold it. |
|
|
927
929
|
|
|
928
|
-
|
|
930
|
+
`lookSensitivity` to `touchMovement` are the camera and controls settings: see
|
|
929
931
|
[camera and look controls](#camera-and-look-controls) for telling the Arcade which of them your game
|
|
930
932
|
uses, and for `gem.controls.look()`, which applies the two sensitivities and the invert for you. An
|
|
931
933
|
older Arcade sends `recommended` without them; the SDK then fills each with its default (`100`,
|
|
932
|
-
`100`, `false`, `'floating'`)
|
|
934
|
+
`100`, `false`, `'floating'`). The last two are the starting graphics quality: see
|
|
935
|
+
[graphics quality](#graphics-quality-the-arcade-picks-the-start-your-game-adapts). An older Arcade
|
|
936
|
+
sends neither; the SDK then fills `graphicsQuality` from `batterySaver` (`'low'` when it is on,
|
|
937
|
+
`'medium'` otherwise) and `graphicsQualityAuto` with `true`, and reads a tier it does not know as
|
|
938
|
+
`'medium'`. So whenever `recommended` is not `null`, all eleven fields are there.
|
|
933
939
|
|
|
934
940
|
**They are recommendations, and the player's own choice in your game always wins:**
|
|
935
941
|
|
|
@@ -949,6 +955,7 @@ older Arcade sends `recommended` without them; the SDK then fills each with its
|
|
|
949
955
|
const DEFAULTS = {
|
|
950
956
|
volume: 100, batterySaver: false, keyboardLayout: 'wasd', gamepadConfirm: 'south', vibration: true,
|
|
951
957
|
lookSensitivity: 100, gamepadLookSensitivity: 100, invertLookY: false, touchMovement: 'floating',
|
|
958
|
+
graphicsQuality: 'medium',
|
|
952
959
|
};
|
|
953
960
|
let chosen = {}; // ONLY what the player picked in your settings screen
|
|
954
961
|
|
|
@@ -1067,6 +1074,66 @@ function frame(dt) {
|
|
|
1067
1074
|
`touchMovement: 'game'` if your game only has one kind.
|
|
1068
1075
|
- **No camera, no call.** A game with no camera to turn declares nothing and never calls `look`.
|
|
1069
1076
|
|
|
1077
|
+
## Graphics quality: the Arcade picks the start, your game adapts
|
|
1078
|
+
|
|
1079
|
+
Players open a lot of games they have never played. Each one should open at a quality that suits
|
|
1080
|
+
the device instead of guessing and stuttering for the first minute. The work is split three ways:
|
|
1081
|
+
|
|
1082
|
+
- **The Arcade picks the starting tier, per device**, and sends it as
|
|
1083
|
+
`gem.prefs.recommended.graphicsQuality`: `'low'`, `'medium'` or `'high'`. On Auto, the player's
|
|
1084
|
+
default, it is the tier the Arcade measured for this browser on this device. Otherwise it is the
|
|
1085
|
+
player's own choice in the Arcade's Settings: Battery saver (`'low'`, and cap your frame rate and
|
|
1086
|
+
cut effects too), Balanced (`'medium'`) or Best looking (`'high'`).
|
|
1087
|
+
- **Your game adapts from there while it runs**: one level down when frames stay slow, one level up
|
|
1088
|
+
when there is plenty of room. `createQualityGovernor` does this for you, so you do not write a
|
|
1089
|
+
frame-time monitor of your own.
|
|
1090
|
+
- **A choice the player made by hand is held.** `graphicsQualityAuto` is `false` when the player
|
|
1091
|
+
picked the tier, and then you render at exactly that tier and never move it yourself. Your own
|
|
1092
|
+
quality option, if your settings screen has one, still wins over the Arcade's, as every
|
|
1093
|
+
[recommended setting](#start-from-the-players-arcade-wide-defaults-gemprefsrecommended) does.
|
|
1094
|
+
|
|
1095
|
+
The governor is a separate import, so a game that does not use it carries none of it:
|
|
1096
|
+
|
|
1097
|
+
```js
|
|
1098
|
+
import { createQualityGovernor } from '@indiegems/gem-web-sdk/quality';
|
|
1099
|
+
|
|
1100
|
+
// Your own levels, lowest first. Names, or a count: `levels: 4` means levels 0 to 3.
|
|
1101
|
+
const governor = createQualityGovernor({
|
|
1102
|
+
gem,
|
|
1103
|
+
levels: ['low', 'medium', 'high'],
|
|
1104
|
+
onChange: (level) => applyQuality(level), // shadows, resolution scale, particles…
|
|
1105
|
+
});
|
|
1106
|
+
applyQuality(governor.level); // where it starts; onChange is not called for that
|
|
1107
|
+
```
|
|
1108
|
+
|
|
1109
|
+
What it does, so you know what to expect:
|
|
1110
|
+
|
|
1111
|
+
- **It starts at the Arcade's tier.** A tier whose name is one of your levels starts there;
|
|
1112
|
+
otherwise `'low'` is your lowest level, `'high'` your highest and `'medium'` your middle one. With
|
|
1113
|
+
no Arcade (`gem.prefs` is `null`, or no `gem`), it starts in the middle.
|
|
1114
|
+
- **It measures your frames itself**, with `requestAnimationFrame`. If your loop already knows its
|
|
1115
|
+
frame time, pass `manual: true` and call `governor.frame(dtMs)` once a frame instead; the first
|
|
1116
|
+
`frame` call switches it to your numbers anyway, so frames are never counted twice.
|
|
1117
|
+
- **Down fast, up slow.** One level down after about 2 seconds of slow frames (the 90th-percentile
|
|
1118
|
+
frame over 1.25 times your frame budget), one level up after about 10 seconds with room to spare
|
|
1119
|
+
(under 0.7 times the budget), and never more than one level above where it started. A single
|
|
1120
|
+
hitch is not slow frames. After every change it ignores 2 seconds of frames, and a level it
|
|
1121
|
+
already had to leave takes twice as long to climb back into.
|
|
1122
|
+
- **Your budget is `1000 / targetFps`**, and `targetFps` is 60 unless you say. A game that caps
|
|
1123
|
+
itself at 30 frames a second on battery saver passes `targetFps: 30`, or every frame reads as
|
|
1124
|
+
slow.
|
|
1125
|
+
- **It never counts a paused game**: not while the Arcade has you paused (`gem.paused`), and not
|
|
1126
|
+
while the tab is hidden. It also ignores the first 2 seconds, which are your game loading.
|
|
1127
|
+
- **It holds a hand-picked tier.** While `graphicsQualityAuto` is `false` it stays at the start and
|
|
1128
|
+
never calls `onChange` on its own. Pass `auto: false` to hold whatever the Arcade says, or
|
|
1129
|
+
`start: 'high'` to start from a level the player chose in your own settings.
|
|
1130
|
+
- **A new recommendation starts it over.** When the player changes Graphics in the Arcade's
|
|
1131
|
+
Settings, the governor goes back to the new start and calls `onChange(level, 'reset')`. It reads
|
|
1132
|
+
`gem.prefs` live, so you do not have to tell it.
|
|
1133
|
+
- **`governor.stats`** has what it measured (`fps`, `p90Ms` and `budgetMs`, the level's index,
|
|
1134
|
+
whether it is holding or paused), for your own debug overlay. Call `governor.dispose()` when your
|
|
1135
|
+
game stops rendering for good.
|
|
1136
|
+
|
|
1070
1137
|
## The Arcade's menu
|
|
1071
1138
|
|
|
1072
1139
|
The Arcade keeps one button over every game, on every device: the Gem, at the top-left. Its menu is
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@indiegems/gem-web-sdk",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.4.0",
|
|
4
4
|
"description": "postMessage bridge contract between gem-web and browser-playable games",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -35,6 +35,10 @@
|
|
|
35
35
|
"types": "./dist/function.d.ts",
|
|
36
36
|
"import": "./dist/gem-web-sdk.function.js"
|
|
37
37
|
},
|
|
38
|
+
"./quality": {
|
|
39
|
+
"types": "./dist/quality.d.ts",
|
|
40
|
+
"import": "./dist/gem-web-sdk.quality.js"
|
|
41
|
+
},
|
|
38
42
|
"./schema": "./schema/bridge.v1.json",
|
|
39
43
|
"./brand/*": "./brand/*"
|
|
40
44
|
},
|
package/schema/bridge.v1.json
CHANGED
|
@@ -804,7 +804,8 @@
|
|
|
804
804
|
"$comment": [
|
|
805
805
|
"The player's ARCADE-WIDE DEFAULTS for this device, which the Arcade",
|
|
806
806
|
"keeps in its own Settings: a starting volume, battery saver, a keyboard",
|
|
807
|
-
"layout, the gamepad's confirm button,
|
|
807
|
+
"layout, the gamepad's confirm button, vibration, the camera and",
|
|
808
|
+
"controls settings and a starting graphics quality. RECOMMENDATIONS",
|
|
808
809
|
"ONLY. The game's own saved settings win: a game starts a setting from",
|
|
809
810
|
"here only while the player has made no choice of their own in that",
|
|
810
811
|
"game, and never overwrites one the player made because this changed.",
|
|
@@ -824,6 +825,16 @@
|
|
|
824
825
|
"the game side all four are present whenever the object is. A game says",
|
|
825
826
|
"which of them it leaves to the player with `gem.controlsDeclare`.",
|
|
826
827
|
"",
|
|
828
|
+
"THE GRAPHICS TWO ARE OPTIONAL INSIDE IT TOO (owner decision",
|
|
829
|
+
"2026-10-11): `graphicsQuality` and `graphicsQualityAuto`, the quality",
|
|
830
|
+
"a game STARTS at on this device. The Arcade picks the start (the",
|
|
831
|
+
"player's Graphics setting, or the tier it detected for this device on",
|
|
832
|
+
"Auto); the game adapts from there while it runs, and holds the start",
|
|
833
|
+
"when the player picked it by hand. A parent built against an older SDK",
|
|
834
|
+
"omits them, and the SDK fills `graphicsQuality` from `batterySaver`",
|
|
835
|
+
"(`low` when it is on, `medium` otherwise) and `graphicsQualityAuto`",
|
|
836
|
+
"with true, so on the game side both are present whenever the object is.",
|
|
837
|
+
"",
|
|
827
838
|
"`muted`, `reducedMotion` and `showFrameStats` stay where they are, at",
|
|
828
839
|
"the top of this message, and keep their meaning: they are the Arcade's",
|
|
829
840
|
"own state the frame acts on, not a recommendation. The Arcade starts",
|
|
@@ -900,6 +911,31 @@
|
|
|
900
911
|
"only `floating` or `fixed` today, and the SDK maps any other value to",
|
|
901
912
|
"the default, `floating`, so a game only ever sees those two."
|
|
902
913
|
]
|
|
914
|
+
},
|
|
915
|
+
"graphicsQuality": {
|
|
916
|
+
"kind": "string",
|
|
917
|
+
"maxLength": 16,
|
|
918
|
+
"format": "code",
|
|
919
|
+
"optional": true,
|
|
920
|
+
"$comment": [
|
|
921
|
+
"The graphics quality a game should START at on this device: `low`,",
|
|
922
|
+
"`medium` or `high`. The player's Graphics setting decides it --",
|
|
923
|
+
"Battery saver sends `low`, Balanced `medium`, Best looking `high`,",
|
|
924
|
+
"and Auto (the default) sends the tier the Arcade detected for this",
|
|
925
|
+
"device. A starting point, not a cap: a game adapts from here while it",
|
|
926
|
+
"runs unless `graphicsQualityAuto` is false.",
|
|
927
|
+
"",
|
|
928
|
+
"A CODE, NOT AN ENUM, so the vocabulary can grow without costing an",
|
|
929
|
+
"older frame the whole message (see WIDENING above): a parent sends",
|
|
930
|
+
"only `low`, `medium` or `high` today, and the SDK maps any other",
|
|
931
|
+
"value to `medium`, so a game only ever sees those three. When it is",
|
|
932
|
+
"absent the SDK fills `low` if `batterySaver` is true, else `medium`."
|
|
933
|
+
]
|
|
934
|
+
},
|
|
935
|
+
"graphicsQualityAuto": {
|
|
936
|
+
"kind": "boolean",
|
|
937
|
+
"optional": true,
|
|
938
|
+
"$comment": "True when the Arcade detected `graphicsQuality` for this device (the player left Graphics on Auto), so the game may step its quality up or down from there as it measures frames; false when the player picked it by hand, so the game holds it and changes it only when the player does (in the Arcade or in the game's own settings). Default true when absent."
|
|
903
939
|
}
|
|
904
940
|
}
|
|
905
941
|
}
|