@indiegems/gem-web-sdk 9.1.4 → 10.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.
@@ -763,6 +763,67 @@
763
763
  "because removing it is a `v` bump and an embedder may legitimately send",
764
764
  "one."
765
765
  ]
766
+ },
767
+ "recommended": {
768
+ "kind": "object",
769
+ "optional": true,
770
+ "$comment": [
771
+ "The player's ARCADE-WIDE DEFAULTS for this device, which the Arcade",
772
+ "keeps in its own Settings: a starting volume, battery saver, a keyboard",
773
+ "layout, the gamepad's confirm button, and vibration. RECOMMENDATIONS",
774
+ "ONLY. The game's own saved settings win: a game starts a setting from",
775
+ "here only while the player has made no choice of their own in that",
776
+ "game, and never overwrites one the player made because this changed.",
777
+ "A game may ignore it entirely.",
778
+ "",
779
+ "OPTIONAL because it is additive: a parent that predates it sends the",
780
+ "fields above without it, and the SDK reports `null`. All five fields",
781
+ "come together or the object is absent -- a parent that keeps only some",
782
+ "of them fills the rest from the defaults below rather than sending a",
783
+ "partial object.",
784
+ "",
785
+ "`muted`, `reducedMotion` and `showFrameStats` stay where they are, at",
786
+ "the top of this message, and keep their meaning: they are the Arcade's",
787
+ "own state the frame acts on, not a recommendation. The Arcade starts",
788
+ "them from the same per-device defaults.",
789
+ "",
790
+ "A DISPLAY PREFERENCE OF THE DEVICE, like `showFrameStats`: the Arcade",
791
+ "keeps one copy per device in the player's account (a guest's on the",
792
+ "device only), so a phone and a television recommend different things.",
793
+ "Sent in the first push after connecting and again on change.",
794
+ "",
795
+ "WIDENING AN ENUM HERE IS NOT FREE. The generated validator refuses the",
796
+ "WHOLE message on any field it rejects, so a value an older frame does",
797
+ "not know would cost it `muted` and `reducedMotion` as well. A new",
798
+ "keyboard layout or confirm button needs a capability the frame",
799
+ "advertises before a parent may send it."
800
+ ],
801
+ "fields": {
802
+ "volume": {
803
+ "kind": "int",
804
+ "min": 0,
805
+ "max": 100,
806
+ "$comment": "Master volume as a percentage, 0..100. Default 100. A level, not a mute: `muted` above is the mute."
807
+ },
808
+ "batterySaver": {
809
+ "kind": "boolean",
810
+ "$comment": "The player asked games to spend less power: a lower frame rate, fewer effects, a lower resolution. Default false."
811
+ },
812
+ "keyboardLayout": {
813
+ "kind": "enum",
814
+ "values": ["wasd", "arrows"],
815
+ "$comment": "Which keys move by default: WASD or the arrow keys. Default `wasd`."
816
+ },
817
+ "gamepadConfirm": {
818
+ "kind": "enum",
819
+ "values": ["south", "east"],
820
+ "$comment": "Which face button confirms, by position: `south` (the bottom button, A on an Xbox pad) or `east` (the right button, B on an Xbox pad); the other one goes back. Default `south`."
821
+ },
822
+ "vibration": {
823
+ "kind": "boolean",
824
+ "$comment": "Whether the player wants vibration and controller rumble. Default true."
825
+ }
826
+ }
766
827
  }
767
828
  },
768
829
  "rateLimit": { "perMinute": 60 }
@@ -2422,11 +2483,12 @@
2422
2483
  "transport": "port",
2423
2484
  "$comment": [
2424
2485
  "What the game adds to the arcade's own menu — the one control the arcade",
2425
- "keeps over a game, in the frame's top-right corner, which is how a player",
2426
- "leaves, mutes, reports a problem, and reaches the game's settings.",
2486
+ "keeps over a game, in a corner `gem.viewport.reserved` names, which is how",
2487
+ "a player leaves, mutes and reports a problem.",
2427
2488
  "",
2428
2489
  " settings: true the game has a settings screen and will open it when",
2429
- " told to; the menu gains a Settings entry",
2490
+ " told to; a parent MAY show a Settings entry for it",
2491
+ " (the Gem Arcade no longer does: see below)",
2430
2492
  " items up to four entries of the game's own, in this order,",
2431
2493
  " below the arcade's entries and visibly apart from them",
2432
2494
  "",
@@ -2454,8 +2516,15 @@
2454
2516
  "entry does nothing but send `gem.menuSelect`.",
2455
2517
  "",
2456
2518
  "Gated by `gameMenu`: sent only to a parent that advertised it. To any",
2457
- "other, `gem.setMenu` returns false and the game shows a settings control",
2458
- "of its own instead."
2519
+ "other, `gem.setMenu` returns false.",
2520
+ "",
2521
+ "THE GEM ARCADE NO LONGER SHOWS A SETTINGS ENTRY FOR `settings: true`.",
2522
+ "A game draws its own settings button (top-right is the recommendation)",
2523
+ "and the Arcade's menu holds the player's Arcade-wide settings instead,",
2524
+ "which reach the game as `gem.prefs.recommended`. The field STAYS: removing",
2525
+ "it is a `v` bump, every game that sends it keeps working, and another",
2526
+ "embedder may still show the entry. A parent that ignores it sends no",
2527
+ "`gem.menuSelect` for it."
2459
2528
  ],
2460
2529
  "fields": {
2461
2530
  "settings": { "kind": "boolean" },