@indiegems/gem-web-sdk 7.4.0 → 7.4.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/README.md +54 -0
- package/dist/gem-web-sdk.esm.js +1 -1
- package/dist/gem-web-sdk.game.js +1 -1
- package/dist/gem-web-sdk.min.js +1 -1
- package/dist/gem-web-sdk.sdk.js +1 -1
- package/dist/gem-web-sdk.server.js +1 -1
- package/docs/achievements.md +232 -0
- package/docs/analytics.md +271 -0
- package/docs/api/api-reference-game.md +15308 -0
- package/docs/api/api-reference-server.md +4397 -0
- package/docs/api/reference.json +24130 -0
- package/docs/arcade-economy.md +263 -0
- package/docs/async-opponents.md +396 -0
- package/docs/brand-art.md +334 -0
- package/docs/cross-promotion.md +137 -0
- package/docs/daily-challenges.md +530 -0
- package/docs/dedicated-server-flow.md +879 -0
- package/docs/deprecation-policy.md +124 -0
- package/docs/friends.md +233 -0
- package/docs/game-economy-tutorial.md +326 -0
- package/docs/getting-started.md +552 -0
- package/docs/inventory-and-catalogs.md +1035 -0
- package/docs/leaderboards.md +277 -0
- package/docs/manifest.json +135 -0
- package/docs/match-session.md +288 -0
- package/docs/p2p-and-parties.md +783 -0
- package/docs/platform-rules.md +372 -0
- package/docs/player-sign-in.md +89 -0
- package/docs/room-shapes.md +195 -0
- package/docs/rooms-and-matches.md +779 -0
- package/docs/saving-player-progress.md +457 -0
- package/docs/server-bundles.md +1041 -0
- package/docs/serverless-functions.md +748 -0
- package/docs/trading-and-gifting.md +98 -0
- package/docs/what-a-game-must-do.md +1231 -0
- package/package.json +7 -2
- package/schema/bridge.v1.json +5 -5
- package/schema/capabilities.public.json +189 -0
package/README.md
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# @indiegems/gem-web-sdk
|
|
2
|
+
|
|
3
|
+
The SDK a browser game uses to run on the Gem Arcade: the signed-in player, their saved
|
|
4
|
+
progress, leaderboards, currencies and items, rooms and matches, and the server a match runs.
|
|
5
|
+
One dependency covers both halves of a game — the browser client and its dedicated server.
|
|
6
|
+
|
|
7
|
+
**Everything you need to build against it is in this package.** The guides are in [`docs/`](docs/),
|
|
8
|
+
the full API reference is in [`docs/api/`](docs/api/), and both are the same text the Gem Arcade
|
|
9
|
+
developer site serves at <https://gemarcade.com/developer/docs>, at the version you installed.
|
|
10
|
+
Read them here rather than guessing from the type declarations, which carry signatures only.
|
|
11
|
+
|
|
12
|
+
## Start here
|
|
13
|
+
|
|
14
|
+
1. [`docs/getting-started.md`](docs/getting-started.md) — the install, the first `createGem`
|
|
15
|
+
call, and getting a build in front of a player. The install is written out there and only
|
|
16
|
+
there.
|
|
17
|
+
2. [`docs/what-a-game-must-do.md`](docs/what-a-game-must-do.md) — what is left for a game once
|
|
18
|
+
the SDK has done its part.
|
|
19
|
+
3. [`docs/platform-rules.md`](docs/platform-rules.md) — the rules the platform enforces that no
|
|
20
|
+
signature states. Read it before you debug matchmaking.
|
|
21
|
+
|
|
22
|
+
## Looking something up
|
|
23
|
+
|
|
24
|
+
| You want | Read |
|
|
25
|
+
|---|---|
|
|
26
|
+
| a symbol on the browser side — `createGem`, `gem.me`, `gem.match`, every type | [`docs/api/api-reference-game.md`](docs/api/api-reference-game.md) |
|
|
27
|
+
| a symbol on the server side — `defineServer` and what a match's server is handed | [`docs/api/api-reference-server.md`](docs/api/api-reference-server.md) |
|
|
28
|
+
| saving a player's progress | [`docs/saving-player-progress.md`](docs/saving-player-progress.md) |
|
|
29
|
+
| asking the player to sign in | [`docs/player-sign-in.md`](docs/player-sign-in.md) |
|
|
30
|
+
| leaderboards | [`docs/leaderboards.md`](docs/leaderboards.md) |
|
|
31
|
+
| currencies, items, shops and loot | [`docs/inventory-and-catalogs.md`](docs/inventory-and-catalogs.md), [`docs/game-economy-tutorial.md`](docs/game-economy-tutorial.md), [`docs/trading-and-gifting.md`](docs/trading-and-gifting.md) |
|
|
32
|
+
| Gems, Tickets and achievements | [`docs/arcade-economy.md`](docs/arcade-economy.md), [`docs/achievements.md`](docs/achievements.md), [`docs/brand-art.md`](docs/brand-art.md) |
|
|
33
|
+
| daily challenges, async opponents, friends, cross-promotion | [`docs/daily-challenges.md`](docs/daily-challenges.md), [`docs/async-opponents.md`](docs/async-opponents.md), [`docs/friends.md`](docs/friends.md), [`docs/cross-promotion.md`](docs/cross-promotion.md) |
|
|
34
|
+
| analytics | [`docs/analytics.md`](docs/analytics.md) |
|
|
35
|
+
| multiplayer — rooms, matches, room shapes | [`docs/rooms-and-matches.md`](docs/rooms-and-matches.md), [`docs/room-shapes.md`](docs/room-shapes.md), [`docs/match-session.md`](docs/match-session.md) |
|
|
36
|
+
| a dedicated server for a match | [`docs/server-bundles.md`](docs/server-bundles.md), [`docs/dedicated-server-flow.md`](docs/dedicated-server-flow.md) |
|
|
37
|
+
| peer-to-peer matches and parties | [`docs/p2p-and-parties.md`](docs/p2p-and-parties.md) |
|
|
38
|
+
| server-side logic without a game server | [`docs/serverless-functions.md`](docs/serverless-functions.md) |
|
|
39
|
+
| when a deprecated surface stops working | [`docs/deprecation-policy.md`](docs/deprecation-policy.md) |
|
|
40
|
+
|
|
41
|
+
Every guide is one Markdown file, so a search over `docs/` finds the page that covers a term.
|
|
42
|
+
|
|
43
|
+
## What is in this package
|
|
44
|
+
|
|
45
|
+
| Path | What it is |
|
|
46
|
+
|---|---|
|
|
47
|
+
| `@indiegems/gem-web-sdk/sdk` | The one import a game writes, in the browser and on its server alike. |
|
|
48
|
+
| `@indiegems/gem-web-sdk/game`, `@indiegems/gem-web-sdk/server` | The browser half and the server half on their own, for a build that wants only one. |
|
|
49
|
+
| `@indiegems/gem-web-sdk/schema` | The wire schema between a game and the Arcade page that hosts it. |
|
|
50
|
+
| `@indiegems/gem-web-sdk/brand/*` | The platform's Gems, Tickets and trophy art — see [`docs/brand-art.md`](docs/brand-art.md). |
|
|
51
|
+
| `gem-sdk-stamp <build-directory>` | Run after your bundler: records which SDK version a build carries, which a published web build has to say. |
|
|
52
|
+
| `docs/` | The guides and the API reference. Not imported by anything, so none of it reaches a player's download. |
|
|
53
|
+
| `docs/api/reference.json` | The API reference as data: every exported symbol, its signature and its documentation. |
|
|
54
|
+
| `docs/manifest.json` | When each guide last changed, with its sha256. |
|