@indiegems/gem-web-sdk 9.0.0 → 9.1.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.
@@ -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/v9.0.0/gem-web-sdk.tgz
84
- curl -fsSL https://downloads.gemarcade.com/sdk/v9.0.0/gem-web-sdk.tgz.sri
83
+ curl -fsSL -O https://downloads.gemarcade.com/sdk/v9.1.0/gem-web-sdk.tgz
84
+ curl -fsSL https://downloads.gemarcade.com/sdk/v9.1.0/gem-web-sdk.tgz.sri
85
85
  openssl dgst -sha384 -binary gem-web-sdk.tgz | openssl base64 -A
86
86
  ```
87
87
 
@@ -528,7 +528,10 @@ credit for it until you say so.
528
528
  inventory and dialog operable on the standard gamepad mapping with the pointer unused, and a focus
529
529
  cue thicker than a hairline — a 1px outline disappears at ten feet. TV remotes arrive as
530
530
  **keyboard-class events** (arrows, Enter, Back), so a game that calls itself a keyboard game is a
531
- D-pad game on a TV whether it planned to be or not.
531
+ D-pad game on a TV whether it planned to be or not. One control a gamepad cannot work: a
532
+ rewarded-ad button. Browsers do not count gamepad input as a press, so a rewarded ask made from
533
+ one is refused ([`rewarded-ads.md` §3](rewarded-ads.md#3-ask-from-the-press-then-re-read)). A
534
+ remote's keys do count. Keep the ordinary way on beside the button working.
532
535
  - **Title-safe layout.** HUD and critical UI inset at least ~5% of the frame — roughly 48–96px at
533
536
  1080p. `env(safe-area-inset-*)` resolves to **0 on every TV**: overscan is a hardware crop the
534
537
  browser cannot see, so no platform can hand you the number and your game must apply its own
@@ -1283,8 +1286,10 @@ nothing, so a reward must never be handed out on the strength of it.
1283
1286
  [`cross-promotion.md`](cross-promotion.md) is the page.
1284
1287
 
1285
1288
  A button the player presses for a reward — a revive, an extra attempt — is the same call with
1286
- `format: 'rewarded'`. Your game config declares what each such button grants, the platform writes
1287
- the reward into your game's inventory, and your game reads it there rather than from the answer.
1289
+ `format: 'rewarded'`, made from that press itself. The button says it is an ad and names the
1290
+ reward, and the Arcade starts the ad as soon as the ask arrives. Your game config declares what
1291
+ each such button grants, the platform writes the reward into your game's inventory, and your game
1292
+ reads it there rather than from the answer.
1288
1293
  [`rewarded-ads.md`](rewarded-ads.md) is that page.
1289
1294
 
1290
1295
  ## An account upsell, if your game has something to offer one
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indiegems/gem-web-sdk",
3
- "version": "9.0.0",
3
+ "version": "9.1.0",
4
4
  "description": "postMessage bridge contract between gem-web and browser-playable games",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -3203,9 +3203,21 @@
3203
3203
  "",
3204
3204
  " RENDER IT IN YOUR OWN CHROME. Labelled as a promotion, dismissible, and",
3205
3205
  " focus-trapped over the paused game. Nothing in this message is rendered.",
3206
- " For `rewarded`, the player pressed the game's button, and the game's",
3207
- " label is not the disclosure: paint an offer sheet that says it is an ad",
3208
- " and what the player gets, with a way to decline, BEFORE anything plays.",
3206
+ " For `rewarded`, the player pressed the game's button, and THAT PRESS IS",
3207
+ " THE OPT-IN: the game's label says it is an ad and names the reward, so",
3208
+ " start the ad without a prompt of your own. Label it as an ad for as long",
3209
+ " as it plays, and let the player close it; closing early is a skip and",
3210
+ " pays nothing. Where no ad could play and nothing was granted, say so",
3211
+ " briefly in your own chrome ('No ad available right now').",
3212
+ "",
3213
+ " DO NOT RELY ON THE FRAME HAVING CHECKED FOR A PRESS. SDK releases after",
3214
+ " 9.0.0 send a rewarded ask only while the frame holds user activation,",
3215
+ " where the browser reports it. Every SDK from 5.1.0 to 9.0.0 sends one",
3216
+ " with no such check, so a game pinned to one of those can ask from a",
3217
+ " timer and start an ad with no press, and a hostile frame posts on the",
3218
+ " port directly. Even the check cannot say which press caused an ask:",
3219
+ " activation belongs to the whole frame for a few seconds, so an ask from",
3220
+ " the game's jump button passes it too.",
3209
3221
  "",
3210
3222
  " PAUSE WITH `gem.pause`. That message already means 'stop running and stop",
3211
3223
  " making noise', which is exactly what is wanted while a panel is up. Do",
@@ -3285,8 +3297,8 @@
3285
3297
  " no; a game reads it identically to `no_ad`.",
3286
3298
  "",
3287
3299
  "AFTER A `rewarded` ASK the player pressed a button, so two of those",
3288
- "readings change. `shown` means an offer sheet was painted and has",
3289
- "closed, whatever the player chose inside it, and still grants nothing.",
3300
+ "readings change. `shown` means the parent painted something for the ask",
3301
+ "and it has closed - the ad, however it ended - and still grants nothing.",
3290
3302
  "`no_ad` can arrive with the reward already granted - where no ad serves",
3291
3303
  "and the game's config says to grant without one, for one - so a game",
3292
3304
  "reads its own inventory, never the outcome, to learn whether a reward",