@indiegems/gem-web-sdk 15.2.0 → 15.3.1
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 +18 -0
- package/brand/ticket-hero-128.png +0 -0
- package/brand/ticket-hero-256.png +0 -0
- package/brand/ticket-hero-384.png +0 -0
- package/brand/ticket-hero-512.png +0 -0
- package/brand/ticket-hero-768.png +0 -0
- package/brand/ticket-icon-20-1.5x.png +0 -0
- package/brand/ticket-icon-20-1x.png +0 -0
- package/brand/ticket-icon-20-2x.png +0 -0
- package/brand/ticket-icon-20-3x.png +0 -0
- package/brand/ticket-icon-32-1.5x.png +0 -0
- package/brand/ticket-icon-32-1x.png +0 -0
- package/brand/ticket-icon-32-2x.png +0 -0
- package/brand/ticket-icon-32-3x.png +0 -0
- package/dist/game.d.ts +2 -0
- package/dist/gem-web-sdk.bridge.js +1 -1
- package/dist/gem-web-sdk.conformance.js +2 -2
- 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 +3 -3
- package/dist/gem-web-sdk.min.js +2 -2
- package/dist/gem-web-sdk.sdk.js +2 -2
- package/dist/gem-web-sdk.server.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/sdk.d.ts +2 -0
- package/docs/api/api-reference-function.md +1 -1
- package/docs/api/api-reference-game.md +19 -1
- package/docs/api/api-reference-server.md +1 -1
- package/docs/api/reference.json +17 -1
- package/docs/arcade-economy.md +17 -11
- package/docs/brand-art.md +13 -12
- package/docs/changelog.md +18 -0
- package/docs/game-economy-tutorial.md +2 -2
- package/docs/getting-started.md +1 -1
- package/docs/inventory-and-catalogs.md +10 -8
- package/docs/manifest.json +16 -16
- package/docs/server-bundles.md +2 -2
- package/docs/what-a-game-must-do.md +24 -14
- package/package.json +1 -1
- package/schema/bridge.v1.json +28 -4
|
@@ -551,8 +551,8 @@ nobody else can touch them. The arcade also has currencies that span every game,
|
|
|
551
551
|
That changes what a shop can be. A player earns in someone else's game and spends in yours.
|
|
552
552
|
|
|
553
553
|
There are two such currencies, and they are not interchangeable: **Gems** (`GEMS`) buy progress and
|
|
554
|
-
**Coins** (`ARCADE_TICKETS`) buy cosmetics
|
|
555
|
-
to use for what.
|
|
554
|
+
**Coins** (`ARCADE_TICKETS`) buy cosmetics, and play items too where Coins' spend scope allows.
|
|
555
|
+
[arcade-economy.md](arcade-economy.md) says which to use for what.
|
|
556
556
|
|
|
557
557
|
### Awarding one
|
|
558
558
|
|
|
@@ -829,14 +829,15 @@ that looks like the arcade's purchase sheet or wallet. A game screen shaped like
|
|
|
829
829
|
chrome is an imitation of it. Your Buy button is yours; asking a player to add currency or pay is
|
|
830
830
|
the arcade's alone.
|
|
831
831
|
|
|
832
|
-
### Coins
|
|
832
|
+
### What Coins and Gems may buy: the spend scope
|
|
833
833
|
|
|
834
834
|
The arcade has two currencies a player spends: **Gems**, for progress, and **Coins**
|
|
835
|
-
(`ARCADE_TICKETS`), for cosmetics
|
|
836
|
-
|
|
837
|
-
set.
|
|
835
|
+
(`ARCADE_TICKETS`), earned by play, for cosmetics and, since 25 Oct 2026, play items too. What
|
|
836
|
+
each may price is decided by two settings: each platform currency's **spend scope**, which the
|
|
837
|
+
platform sets, and each of your items' **category**, which you set.
|
|
838
838
|
|
|
839
|
-
- A currency whose spend scope is **`cosmetic_only`** may price cosmetics only. Coins' is
|
|
839
|
+
- A currency whose spend scope is **`cosmetic_only`** may price cosmetics only. Coins' is, until
|
|
840
|
+
the platform moves it to `any` to let Coins price play items.
|
|
840
841
|
- A currency whose spend scope is **`any`** may price anything. Gems' is.
|
|
841
842
|
|
|
842
843
|
The platform owns each currency's scope and can change it, so do not hard-code which is which: a
|
|
@@ -884,7 +885,8 @@ purchase catalog stops listing that currency's price on anything the scope does
|
|
|
884
885
|
purchase naming such a price is refused `not_purchasable` before anything is charged.
|
|
885
886
|
|
|
886
887
|
The category is a declaration the platform takes at your word, and the release review checks it.
|
|
887
|
-
Labelling something that affects play `cosmetic` so it can be sold for Coins breaks platform policy
|
|
888
|
+
Labelling something that affects play `cosmetic` so it can be sold for Coins breaks platform policy,
|
|
889
|
+
whatever the scope: a play item sold for Coins keeps `category: progression`.
|
|
888
890
|
|
|
889
891
|
**To sell a cosmetic that needs game progress first, sell it through a recipe.** An item's own
|
|
890
892
|
`platform_prices` cannot carry prerequisites; a recipe's can. Grant the cosmetic from a recipe that
|
package/docs/manifest.json
CHANGED
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
"file": "arcade-economy.md",
|
|
26
|
-
"sha256": "
|
|
27
|
-
"updated": "2026-10-
|
|
26
|
+
"sha256": "1ebae3aeff2480722b09bc15d8a997656238133e757c9588a0eaa9479b990270",
|
|
27
|
+
"updated": "2026-10-25T19:46:22Z"
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
"file": "async-opponents.md",
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
"file": "brand-art.md",
|
|
36
|
-
"sha256": "
|
|
37
|
-
"updated": "2026-10-
|
|
36
|
+
"sha256": "6d51ae596f6b43fb79058412ab8b10922829dd4e37631ca42f9063d5f43b5029",
|
|
37
|
+
"updated": "2026-10-25T16:18:07Z"
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
"file": "changelog.md",
|
|
41
|
-
"sha256": "
|
|
42
|
-
"updated": "2026-10-
|
|
41
|
+
"sha256": "2d316c2f527103a2d909128ae35dbde2f5d884ab9d8439bb0451a598552c23e0",
|
|
42
|
+
"updated": "2026-10-26T11:09:11Z"
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
"file": "daily-challenges.md",
|
|
@@ -63,18 +63,18 @@
|
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
65
|
"file": "game-economy-tutorial.md",
|
|
66
|
-
"sha256": "
|
|
67
|
-
"updated": "2026-10-
|
|
66
|
+
"sha256": "c037a74f206f094392f09e0f7b292271145a4d72b631b93f878705171e52475a",
|
|
67
|
+
"updated": "2026-10-25T19:46:22Z"
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
70
|
"file": "getting-started.md",
|
|
71
|
-
"sha256": "
|
|
72
|
-
"updated": "2026-10-
|
|
71
|
+
"sha256": "fd19aa41161ecbfa31aadcf5737bebc50b8c4eaa1686ec50cd4252c224ccbf2a",
|
|
72
|
+
"updated": "2026-10-26T11:09:11Z"
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
75
|
"file": "inventory-and-catalogs.md",
|
|
76
|
-
"sha256": "
|
|
77
|
-
"updated": "2026-10-
|
|
76
|
+
"sha256": "4295b4a12770584a80d94a94d95e464553569d7318229413cdfbb604b6e1f9d8",
|
|
77
|
+
"updated": "2026-10-25T19:46:22Z"
|
|
78
78
|
},
|
|
79
79
|
{
|
|
80
80
|
"file": "leaderboards.md",
|
|
@@ -128,8 +128,8 @@
|
|
|
128
128
|
},
|
|
129
129
|
{
|
|
130
130
|
"file": "server-bundles.md",
|
|
131
|
-
"sha256": "
|
|
132
|
-
"updated": "2026-10-
|
|
131
|
+
"sha256": "57dcaa21a1f9f00910c20bdf0d3aa92500e1f829fffd40ab8477706cf2d107d8",
|
|
132
|
+
"updated": "2026-10-26T11:09:11Z"
|
|
133
133
|
},
|
|
134
134
|
{
|
|
135
135
|
"file": "serverless-functions-js.md",
|
|
@@ -153,8 +153,8 @@
|
|
|
153
153
|
},
|
|
154
154
|
{
|
|
155
155
|
"file": "what-a-game-must-do.md",
|
|
156
|
-
"sha256": "
|
|
157
|
-
"updated": "2026-10-
|
|
156
|
+
"sha256": "c449db410f2d7d9b1c7cfb305754103a1f4f03fb62781d9a1dc1e7dfb3fa459c",
|
|
157
|
+
"updated": "2026-10-23T22:49:46Z"
|
|
158
158
|
}
|
|
159
159
|
]
|
|
160
160
|
}
|
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/v15.
|
|
84
|
-
curl -fsSL https://downloads.gemarcade.com/sdk/v15.
|
|
83
|
+
curl -fsSL -O https://downloads.gemarcade.com/sdk/v15.3.1/gem-web-sdk.tgz
|
|
84
|
+
curl -fsSL https://downloads.gemarcade.com/sdk/v15.3.1/gem-web-sdk.tgz.sri
|
|
85
85
|
openssl dgst -sha384 -binary gem-web-sdk.tgz | openssl base64 -A
|
|
86
86
|
```
|
|
87
87
|
|
|
@@ -1076,19 +1076,20 @@ The player sets their defaults once, in the Arcade's Settings, separately for ea
|
|
|
1076
1076
|
and a television can say different things. They reach your game as `gem.prefs.recommended`, in the
|
|
1077
1077
|
same push as `muted` and `reducedMotion`, and again whenever the player changes one:
|
|
1078
1078
|
|
|
1079
|
-
| Field | Values | What it suggests
|
|
1080
|
-
| ------------------------ | ------------------------------- |
|
|
1081
|
-
| `volume` | `0` to `100` | Your master volume's starting level, as a percentage — divide by 100 for a gain. A level, never a mute.
|
|
1082
|
-
| `batterySaver` | `true` / `false` | Spend less power: a lower frame rate, fewer effects, a lower resolution.
|
|
1083
|
-
| `keyboardLayout` | `'wasd'` / `'arrows'` | Which keys move by default.
|
|
1084
|
-
| `gamepadConfirm` | `'south'` / `'east'` | Which face button confirms, by position: the bottom one (A on an Xbox controller) or the right one (B). The other one goes back.
|
|
1085
|
-
| `vibration` | `true` / `false` | Your vibration toggle's starting state ([if your game vibrates](#if-your-game-vibrates)).
|
|
1086
|
-
| `lookSensitivity` | `20` to `400` | Look speed for touch, mouse and pen, as a percentage of the base speeds: `100` is 1×.
|
|
1087
|
-
| `gamepadLookSensitivity` | `20` to `400` | Look speed for a gamepad stick, as a percentage: `100` is 1×.
|
|
1088
|
-
| `invertLookY` | `true` / `false` | Up/down look inverted: pushing up or dragging up looks down. Pitch only, never yaw.
|
|
1089
|
-
| `touchMovement` | `'floating'` / `'fixed'` | On a touch screen, a movement stick that appears where the thumb lands, or one fixed in place.
|
|
1090
|
-
| `graphicsQuality` | `'low'` / `'medium'` / `'high'` | The graphics quality to start at on this device.
|
|
1091
|
-
| `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.
|
|
1079
|
+
| Field | Values | What it suggests |
|
|
1080
|
+
| ------------------------ | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1081
|
+
| `volume` | `0` to `100` | Your master volume's starting level, as a percentage — divide by 100 for a gain. A level, never a mute. |
|
|
1082
|
+
| `batterySaver` | `true` / `false` | Spend less power: a lower frame rate, fewer effects, a lower resolution. |
|
|
1083
|
+
| `keyboardLayout` | `'wasd'` / `'arrows'` | Which keys move by default. |
|
|
1084
|
+
| `gamepadConfirm` | `'south'` / `'east'` | Which face button confirms, by position: the bottom one (A on an Xbox controller) or the right one (B). The other one goes back. |
|
|
1085
|
+
| `vibration` | `true` / `false` | Your vibration toggle's starting state ([if your game vibrates](#if-your-game-vibrates)). |
|
|
1086
|
+
| `lookSensitivity` | `20` to `400` | Look speed for touch, mouse and pen, as a percentage of the base speeds: `100` is 1×. |
|
|
1087
|
+
| `gamepadLookSensitivity` | `20` to `400` | Look speed for a gamepad stick, as a percentage: `100` is 1×. |
|
|
1088
|
+
| `invertLookY` | `true` / `false` | Up/down look inverted: pushing up or dragging up looks down. Pitch only, never yaw. |
|
|
1089
|
+
| `touchMovement` | `'floating'` / `'fixed'` | On a touch screen, a movement stick that appears where the thumb lands, or one fixed in place. |
|
|
1090
|
+
| `graphicsQuality` | `'low'` / `'medium'` / `'high'` | The graphics quality to start at on this device. |
|
|
1091
|
+
| `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. |
|
|
1092
|
+
| `colorHelp` | `true` / `false` / `null` | Color help: start your colour-blind aids (patterns or symbols beside colours, a colour-blind palette) on, or off. `null`: no advice. |
|
|
1092
1093
|
|
|
1093
1094
|
`lookSensitivity` to `touchMovement` are the camera and controls settings: see
|
|
1094
1095
|
[camera and look controls](#camera-and-look-controls) for `gem.controls.look()`, which applies the
|
|
@@ -1098,7 +1099,15 @@ older Arcade sends `recommended` without them; the SDK then fills each with its
|
|
|
1098
1099
|
[graphics quality](#graphics-quality-the-arcade-picks-the-start-your-game-adapts). An older Arcade
|
|
1099
1100
|
sends neither; the SDK then fills `graphicsQuality` from `batterySaver` (`'low'` when it is on,
|
|
1100
1101
|
`'medium'` otherwise) and `graphicsQualityAuto` with `true`, and reads a tier it does not know as
|
|
1101
|
-
`'medium'`. So whenever `recommended` is not `null`,
|
|
1102
|
+
`'medium'`. So whenever `recommended` is not `null`, those eleven fields are there.
|
|
1103
|
+
|
|
1104
|
+
`colorHelp` is the player's **Color help** default, and the one field the SDK does not fill: an
|
|
1105
|
+
older Arcade omits it and you read `null`, which means the Arcade made **no recommendation** — not
|
|
1106
|
+
`false`. Keep your own default then. A game that offers colour-blind aids starts them from it, on
|
|
1107
|
+
first run or while the player has not chosen in your game, and never lets it override the player's
|
|
1108
|
+
own choice; it is the natural start for the `toggle` you declare with `icon: 'eye'`
|
|
1109
|
+
([the Arcade's quick row](#mirror-your-settings-into-the-arcades-menu-gemsettings)). A game with
|
|
1110
|
+
no such aids ignores it.
|
|
1102
1111
|
|
|
1103
1112
|
**They are recommendations, and the player's own choice in your game always wins:**
|
|
1104
1113
|
|
|
@@ -1126,6 +1135,7 @@ const DEFAULTS = {
|
|
|
1126
1135
|
invertLookY: false,
|
|
1127
1136
|
touchMovement: 'floating',
|
|
1128
1137
|
graphicsQuality: 'medium',
|
|
1138
|
+
colorHelp: false, // your own default; `recommended.colorHelp` is null when the Arcade said nothing
|
|
1129
1139
|
};
|
|
1130
1140
|
let chosen = {}; // ONLY what the player picked in your settings screen
|
|
1131
1141
|
|
package/package.json
CHANGED
package/schema/bridge.v1.json
CHANGED
|
@@ -972,10 +972,11 @@
|
|
|
972
972
|
"The player's ARCADE-WIDE DEFAULTS for this device, which the Arcade",
|
|
973
973
|
"keeps in its own Settings: a starting volume, battery saver, a keyboard",
|
|
974
974
|
"layout, the gamepad's confirm button, vibration, the camera and",
|
|
975
|
-
"controls settings
|
|
976
|
-
"ONLY. The game's own saved settings win: a game starts
|
|
977
|
-
"here only while the player has made no choice of their
|
|
978
|
-
"game, and never overwrites one the player made because
|
|
975
|
+
"controls settings, a starting graphics quality and Color help.",
|
|
976
|
+
"RECOMMENDATIONS ONLY. The game's own saved settings win: a game starts",
|
|
977
|
+
"a setting from here only while the player has made no choice of their",
|
|
978
|
+
"own in that game, and never overwrites one the player made because",
|
|
979
|
+
"this changed.",
|
|
979
980
|
"A game may ignore it entirely.",
|
|
980
981
|
"",
|
|
981
982
|
"OPTIONAL because it is additive: a parent that predates it sends the",
|
|
@@ -1002,6 +1003,10 @@
|
|
|
1002
1003
|
"(`low` when it is on, `medium` otherwise) and `graphicsQualityAuto`",
|
|
1003
1004
|
"with true, so on the game side both are present whenever the object is.",
|
|
1004
1005
|
"",
|
|
1006
|
+
"`colorHelp` IS OPTIONAL INSIDE IT AND STAYS ABSENT (owner decision",
|
|
1007
|
+
"2026-10-23): the SDK does NOT fill it. An older parent omits it and the",
|
|
1008
|
+
"game reads `null`, \"no recommendation\", never false.",
|
|
1009
|
+
"",
|
|
1005
1010
|
"`muted`, `reducedMotion` and `showFrameStats` stay where they are, at",
|
|
1006
1011
|
"the top of this message, and keep their meaning: they are the Arcade's",
|
|
1007
1012
|
"own state the frame acts on, not a recommendation. The Arcade starts",
|
|
@@ -1103,6 +1108,25 @@
|
|
|
1103
1108
|
"kind": "boolean",
|
|
1104
1109
|
"optional": true,
|
|
1105
1110
|
"$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."
|
|
1111
|
+
},
|
|
1112
|
+
"colorHelp": {
|
|
1113
|
+
"kind": "boolean",
|
|
1114
|
+
"optional": true,
|
|
1115
|
+
"$comment": [
|
|
1116
|
+
"The player's Arcade-wide Color help default for this device (owner",
|
|
1117
|
+
"decision 2026-10-23): true asks a game that offers colour-blind aids",
|
|
1118
|
+
"-- patterns or symbols beside colours, a colour-blind palette -- to",
|
|
1119
|
+
"start with them ON; false asks it to start with them off. A DEFAULT",
|
|
1120
|
+
"ONLY, like every field here: a game applies it on first run, or",
|
|
1121
|
+
"while the player has made no choice of their own in that game, and",
|
|
1122
|
+
"never overrides the player's in-game choice. A game with no such",
|
|
1123
|
+
"aids ignores it.",
|
|
1124
|
+
"",
|
|
1125
|
+
"ABSENT IS NOT FALSE. A parent built against an older SDK omits it,",
|
|
1126
|
+
"and that absence means the Arcade made no recommendation: the SDK",
|
|
1127
|
+
"reports `null` and the game keeps its own default. Unlike the",
|
|
1128
|
+
"camera and controls fields there is no neutral value to invent."
|
|
1129
|
+
]
|
|
1106
1130
|
}
|
|
1107
1131
|
}
|
|
1108
1132
|
}
|