@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.
- package/CHANGELOG.md +6 -0
- 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.sdk.js +2 -2
- package/dist/gem-web-sdk.server.js +1 -1
- package/docs/api/api-reference-game.md +43 -9
- package/docs/api/api-reference-server.md +1 -1
- package/docs/api/reference.json +4 -4
- package/docs/changelog.md +6 -0
- package/docs/cross-promotion.md +60 -21
- package/docs/getting-started.md +1 -1
- package/docs/manifest.json +12 -12
- package/docs/rewarded-ads.md +299 -147
- package/docs/server-bundles.md +2 -2
- package/docs/what-a-game-must-do.md +8 -3
- package/package.json +1 -1
- package/schema/bridge.v1.json +17 -5
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/v9.
|
|
84
|
-
curl -fsSL https://downloads.gemarcade.com/sdk/v9.
|
|
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'
|
|
1287
|
-
the
|
|
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
package/schema/bridge.v1.json
CHANGED
|
@@ -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
|
|
3207
|
-
"
|
|
3208
|
-
"
|
|
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
|
|
3289
|
-
"closed
|
|
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",
|