@indiegems/gem-web-sdk 14.0.1 → 14.0.3
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 +12 -0
- package/README.md +2 -2
- 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 +8 -1
- package/dist/gem-web-sdk.esm.js +1 -1
- package/dist/gem-web-sdk.function.js +3 -3
- 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/sdk.d.ts +8 -1
- package/docs/achievements.md +2 -2
- package/docs/api/api-reference-function.md +3 -3
- package/docs/api/api-reference-game.md +30 -22
- package/docs/api/api-reference-server.md +1 -1
- package/docs/api/reference.json +15 -15
- package/docs/arcade-avatars.md +3 -3
- package/docs/arcade-economy.md +37 -36
- package/docs/brand-art.md +31 -30
- package/docs/changelog.md +12 -0
- package/docs/daily-challenges.md +1 -1
- package/docs/game-economy-tutorial.md +14 -14
- package/docs/getting-started.md +1 -1
- package/docs/inventory-and-catalogs.md +29 -29
- package/docs/manifest.json +34 -34
- package/docs/platform-rules.md +2 -2
- package/docs/rewarded-ads.md +1 -1
- package/docs/rooms-and-matches.md +18 -0
- package/docs/saving-player-progress.md +1 -1
- package/docs/server-bundles.md +2 -2
- package/docs/serverless-functions.md +2 -2
- package/docs/trading-and-gifting.md +1 -1
- package/docs/what-a-game-must-do.md +10 -10
- package/package.json +1 -1
- package/schema/bridge.v1.json +8 -8
|
@@ -507,7 +507,7 @@ unlock_celebration: arcade
|
|
|
507
507
|
always get the Arcade's card, whatever you declare.
|
|
508
508
|
- **Only the store page on `release` is read**, and it takes effect when that page is
|
|
509
509
|
promoted. It is display-only, and it needs no `schema_version` change.
|
|
510
|
-
- **Gems or
|
|
510
|
+
- **Gems or Coins paid in the same moment** still go through `gem.cueReward`, with
|
|
511
511
|
no flight of your own.
|
|
512
512
|
|
|
513
513
|
How your game learns an unlock happened, and the field's full rules, are in
|
|
@@ -618,7 +618,7 @@ there is no route by which the frame could request one. `createGem` forwards all
|
|
|
618
618
|
player would mind losing there, and never hold it back for a terminate warning that may not come.
|
|
619
619
|
|
|
620
620
|
**Re-read on resume.** Your game is told that it was paused and resumed, never why, and never
|
|
621
|
-
what the player did in the meantime. Their Gems and
|
|
621
|
+
what the player did in the meantime. Their Gems and Coins can change while you are paused, so
|
|
622
622
|
if your game keeps anything worked out from a balance, such as a Buy button it greyed out or a
|
|
623
623
|
"not enough Gems" line, read `gem.platform.currencies.get()` again on every `onPause(false)`
|
|
624
624
|
rather than trusting what it read before the pause
|
|
@@ -731,10 +731,10 @@ game, a framed or full-window game on a desktop, a tablet or a TV in native full
|
|
|
731
731
|
|
|
732
732
|
- **The Gem button**, the Gem Arcade's gem, always there (a 44px square touch target), in
|
|
733
733
|
the **top-left corner** unless your game [asks for another](#moving-the-gem-gemsetgemcorner). It
|
|
734
|
-
opens [the Arcade's menu](#the-arcades-menu): Return to the Arcade, the player's Gems,
|
|
734
|
+
opens [the Arcade's menu](#the-arcades-menu): Return to the Arcade, the player's Gems, Coins and
|
|
735
735
|
achievement score, mute, the player's Arcade-wide settings and the rest. Not your settings: those
|
|
736
736
|
are [your own button](#game-settings).
|
|
737
|
-
- **Nothing else.** The player's wallets (Gems,
|
|
737
|
+
- **Nothing else.** The player's wallets (Gems, Coins, their achievement score) are **not** drawn
|
|
738
738
|
over your game: the player opens the Gem menu to see them, and every platform-currency payout
|
|
739
739
|
flies into the Gem button ([the Arcade's wallet](#the-arcades-wallet-in-the-gem-menu-never-drawn-by-you)).
|
|
740
740
|
When the player switches the frame-rate readout on, it sits beside the gem and is reserved the
|
|
@@ -1387,7 +1387,7 @@ What it does, so you know what to expect:
|
|
|
1387
1387
|
|
|
1388
1388
|
The Arcade keeps one button over every game, on every device: the Gem, top-left unless your game
|
|
1389
1389
|
[asks for another corner](#moving-the-gem-gemsetgemcorner). Its menu is
|
|
1390
|
-
how a player leaves (**Return to the Arcade**), sees their Gems,
|
|
1390
|
+
how a player leaves (**Return to the Arcade**), sees their Gems, Coins and achievement score, mutes,
|
|
1391
1391
|
goes fullscreen, reports a problem and changes their Arcade-wide settings — the ones that reach you as [`gem.prefs.recommended`](#game-settings). You can add up to
|
|
1392
1392
|
four entries of your own:
|
|
1393
1393
|
|
|
@@ -1532,13 +1532,13 @@ and the release checklist checks that it does.
|
|
|
1532
1532
|
|
|
1533
1533
|
## The Arcade's wallet: in the Gem menu, never drawn by you
|
|
1534
1534
|
|
|
1535
|
-
The player's platform balances — Gems,
|
|
1535
|
+
The player's platform balances — Gems, Coins (`ARCADE_TICKETS`) and their achievement score —
|
|
1536
1536
|
belong to the Arcade. **Your game never draws one**, and never shows a pending state for one: the
|
|
1537
1537
|
Arcade takes every figure from the platform and shows them itself.
|
|
1538
1538
|
|
|
1539
1539
|
**The Gem Arcade draws no wallet over your game** (since 2026-10-11). Nothing of it sits in your top
|
|
1540
1540
|
row, at rest or when a balance moves. The player opens the Gem menu — the Gem button, in whichever
|
|
1541
|
-
corner it sits — to see their Gems,
|
|
1541
|
+
corner it sits — to see their Gems, Coins and achievement score, and every payout
|
|
1542
1542
|
[`gem.cueReward`](inventory-and-catalogs.md#showing-the-reward-land-in-the-arcades-wallet) announces
|
|
1543
1543
|
flies into the Gem button. A payout you do not cue flies too, from the middle of your frame, so cue
|
|
1544
1544
|
the ones the player earns on screen and the flight starts where they are looking.
|
|
@@ -1825,7 +1825,7 @@ first:
|
|
|
1825
1825
|
### The signed-in player's Boost: show it, never gate on it
|
|
1826
1826
|
|
|
1827
1827
|
`gem.player` also carries **`boost`** — the player's Boost, which the Arcade sells for real money.
|
|
1828
|
-
While it lasts the player earns Gems and
|
|
1828
|
+
While it lasts the player earns Gems and Coins faster (never achievement points), and the
|
|
1829
1829
|
platform raises their earning limits to match. The platform does all of that on its own side when
|
|
1830
1830
|
it pays; your game does nothing to make a boost work.
|
|
1831
1831
|
|
|
@@ -1840,8 +1840,8 @@ backend without boosts, a read that has not landed yet — it reads as **not boo
|
|
|
1840
1840
|
player who has no boost.
|
|
1841
1841
|
|
|
1842
1842
|
```js
|
|
1843
|
-
const
|
|
1844
|
-
if (
|
|
1843
|
+
const coins = gem.player?.boost.multipliers.find((m) => m.currencySlug === 'ARCADE_TICKETS');
|
|
1844
|
+
if (coins && coins.multiplier > 1) rewardScreen.showBadge(`${coins.multiplier}× Coins`);
|
|
1845
1845
|
```
|
|
1846
1846
|
|
|
1847
1847
|
⚠️ **It is for display, and only for display** — a "2×" badge on a reward screen. Never gate
|
package/package.json
CHANGED
package/schema/bridge.v1.json
CHANGED
|
@@ -774,7 +774,7 @@
|
|
|
774
774
|
"The player's Boost, FOR DISPLAY ONLY — a platform rule, not advice. A",
|
|
775
775
|
"Boost is something the Arcade sells for real money: it",
|
|
776
776
|
"multiplies what the player EARNS in platform currencies (Gems and",
|
|
777
|
-
"
|
|
777
|
+
"Coins) and raises their earning limits. It never touches achievement",
|
|
778
778
|
"points.",
|
|
779
779
|
"",
|
|
780
780
|
"ADVISORY. It may lag: it is pushed on connect and again when the",
|
|
@@ -1678,7 +1678,7 @@
|
|
|
1678
1678
|
"kind": "string",
|
|
1679
1679
|
"maxLength": 64,
|
|
1680
1680
|
"optional": true,
|
|
1681
|
-
"$comment": "Why a ticket ended without a match: `timed_out`, `heartbeat_lapsed`, `requested`, `party_changed`, `handoff_failed`. Open, so a reason added later reaches the game."
|
|
1681
|
+
"$comment": "Why a ticket ended without a match: `timed_out`, `heartbeat_lapsed`, `requested`, `party_changed`, `handoff_failed`, `no_capacity`. Open, so a reason added later reaches the game."
|
|
1682
1682
|
},
|
|
1683
1683
|
"roomId": {
|
|
1684
1684
|
"kind": "string",
|
|
@@ -2737,9 +2737,9 @@
|
|
|
2737
2737
|
"other, `gem.cueReward` returns false and the game does NOTHING. There is",
|
|
2738
2738
|
"no fallback celebration: Gems display belongs to the arcade (the",
|
|
2739
2739
|
"creator's ruling, 2026-09-24), so a game draws no Gems flight, counter or",
|
|
2740
|
-
"celebration of its own. The same holds for
|
|
2740
|
+
"celebration of its own. The same holds for Coins (`ARCADE_TICKETS`):",
|
|
2741
2741
|
"`currencySlug` decides what flies and which total moves. `origin` is the",
|
|
2742
|
-
"centre of the game's icon for that currency — its gem, or its
|
|
2742
|
+
"centre of the game's icon for that currency — its gem, or its coin."
|
|
2743
2743
|
],
|
|
2744
2744
|
"fields": {
|
|
2745
2745
|
"currencySlug": { "kind": "string", "maxLength": 32 },
|
|
@@ -2761,7 +2761,7 @@
|
|
|
2761
2761
|
"direction": "frameToParent",
|
|
2762
2762
|
"transport": "port",
|
|
2763
2763
|
"$comment": [
|
|
2764
|
-
"Whether the arcade shows the player's platform wallets (Gems,
|
|
2764
|
+
"Whether the arcade shows the player's platform wallets (Gems, Coins, the",
|
|
2765
2765
|
"achievement score) over the game right now — and, optionally, which of them.",
|
|
2766
2766
|
"",
|
|
2767
2767
|
"OPT-OUT. With no message at all, the parent shows EVERY wallet: a game that",
|
|
@@ -2775,7 +2775,7 @@
|
|
|
2775
2775
|
"",
|
|
2776
2776
|
"The narrowing is in force when EITHER optional field is present, and is",
|
|
2777
2777
|
"ignored while `visible` is false. It is for a screen about one currency (a",
|
|
2778
|
-
"
|
|
2778
|
+
"Coins store); leaving it out is always safe. `currencies` are platform",
|
|
2779
2779
|
"currency slugs (`GEMS`, `ARCADE_TICKETS`), matched exactly and",
|
|
2780
2780
|
"case-sensitively against the wallets the parent draws; a slug it does not",
|
|
2781
2781
|
"draw is ignored. `score` is its own field so it can never collide with a slug.",
|
|
@@ -3677,14 +3677,14 @@
|
|
|
3677
3677
|
" `unknown_currency` or `currency_not_in_game_payable`. Resolve it EXACTLY,",
|
|
3678
3678
|
" with no",
|
|
3679
3679
|
" alias table of your own: the retired `TICKETS` meant GEMS, and resolving",
|
|
3680
|
-
" it charged Gems to games that meant
|
|
3680
|
+
" it charged Gems to games that meant Coins. An item may carry prices in",
|
|
3681
3681
|
" more than one payable currency, so",
|
|
3682
3682
|
" the frame does choose which wallet pays; the prompt names that currency",
|
|
3683
3683
|
" and its price from platform records, which keeps the choice the player's.",
|
|
3684
3684
|
"",
|
|
3685
3685
|
" A PAYABLE CURRENCY MAY BE ONE THE PLAYER BOUGHT. This shipped on the",
|
|
3686
3686
|
" argument that a payable currency is only ever EARNED: short of Gems or",
|
|
3687
|
-
"
|
|
3687
|
+
" Coins the answer was to go and play, and neither was sold for money.",
|
|
3688
3688
|
" That is no longer true of Gems. The arcade's own store sells them, and",
|
|
3689
3689
|
" bought Gems stay payable in games (owner decision, 2026-10-06). So",
|
|
3690
3690
|
" where a balance came from protects",
|