@arcadible/sdk 1.5.0-next.4 → 1.5.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/README.md +26 -3
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -7,20 +7,26 @@
|
|
|
7
7
|
<h1 align="center">Arcadible SDK</h1>
|
|
8
8
|
|
|
9
9
|
<p align="center">
|
|
10
|
-
|
|
10
|
+
How your game works with Arcadible.
|
|
11
11
|
</p>
|
|
12
12
|
|
|
13
13
|
<p align="center">
|
|
14
14
|
<a href="https://developer.arcadible.com/references/arcadible-sdk">Docs</a> ·
|
|
15
15
|
<a href="https://developer.arcadible.com/build/initialization">Initialization</a> ·
|
|
16
16
|
<a href="https://developer.arcadible.com/build/saves">Saves</a> ·
|
|
17
|
+
<a href="https://developer.arcadible.com/build/pausing">Pausing</a> ·
|
|
17
18
|
<a href="https://arcadible.com">Arcadible</a> ·
|
|
18
19
|
<a href="https://studio.arcadible.com">Studio</a>
|
|
19
20
|
</p>
|
|
20
21
|
|
|
21
22
|
<br>
|
|
22
23
|
|
|
23
|
-
The Arcadible SDK is optional: a game runs on [Arcadible](https://arcadible.com) without it. With it, a game gets
|
|
24
|
+
The Arcadible SDK is optional: a game runs on [Arcadible](https://arcadible.com) without it. With it, a game gets these from the play page around it:
|
|
25
|
+
|
|
26
|
+
- **[Initialization](https://developer.arcadible.com/build/initialization),** bracketed, so Arcadible's loading screen shows the game's splash and progress until its first frame is drawn.
|
|
27
|
+
- **[Saves](https://developer.arcadible.com/build/saves),** kept by the play page, so the player's progress carries over from one version to the next.
|
|
28
|
+
- **[Pausing](https://developer.arcadible.com/build/pausing):** Arcadible tells the game when to stop, go quiet, and save, and when to carry on.
|
|
29
|
+
- **[`system` and `context`](https://developer.arcadible.com/references/arcadible-sdk#system):** the store's language, and when this run launched.
|
|
24
30
|
|
|
25
31
|
## Install
|
|
26
32
|
|
|
@@ -58,11 +64,28 @@ Saves are for what your game remembers between sessions, such as progress, setti
|
|
|
58
64
|
|
|
59
65
|
Off Arcadible, such as on your dev server, the package still works, with the same rules and limits: there's no loading screen, so `initComplete()` resolves at once, saves are kept in the game's own browser storage, `arcadible.saves.where` is `"build"`, and `arcadible.build` is `null`.
|
|
60
66
|
|
|
67
|
+
## Pause and resume
|
|
68
|
+
|
|
69
|
+
```js
|
|
70
|
+
arcadible.on("pause", async () => {
|
|
71
|
+
loop.stop();
|
|
72
|
+
audio.mute();
|
|
73
|
+
await arcadible.saves.write("progress", JSON.stringify(progress));
|
|
74
|
+
});
|
|
75
|
+
arcadible.on("resume", () => {
|
|
76
|
+
loop.start();
|
|
77
|
+
audio.unmute();
|
|
78
|
+
});
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Arcadible pauses your game when the page is hidden, when it covers your game, and before it closes or reloads it, when it waits a moment for your save. Stop, go quiet, and save, drawing nothing over your game; on `resume`, carry on, or show a "Ready?" first in an action game.
|
|
82
|
+
|
|
61
83
|
## Learn more
|
|
62
84
|
|
|
63
85
|
- [Initialization](https://developer.arcadible.com/build/initialization): where each call goes, progress, and what comes after.
|
|
64
86
|
- [Saves](https://developer.arcadible.com/build/saves): using saves well, across versions, channels, and tabs, and where they're kept.
|
|
65
|
-
- [
|
|
87
|
+
- [Pausing](https://developer.arcadible.com/build/pausing): what a pause asks of your game, and resuming.
|
|
88
|
+
- [Arcadible SDK](https://developer.arcadible.com/references/arcadible-sdk): including it, every call, the saves' included, `system` and `context`, and every code.
|
|
66
89
|
- [Limits](https://developer.arcadible.com/references/limits#saves): how many saves, and how large.
|
|
67
90
|
|
|
68
91
|
## License
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "1.5.0
|
|
1
|
+
export declare const VERSION = "1.5.0";
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "Offst, Inc.",
|
|
3
|
-
"description": "The Arcadible SDK:
|
|
3
|
+
"description": "The Arcadible SDK: how your game works with Arcadible.",
|
|
4
4
|
"devDependencies": {
|
|
5
5
|
"@playwright/test": "1.63.0",
|
|
6
6
|
"@types/node": "^25.0.3",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
],
|
|
44
44
|
"type": "module",
|
|
45
45
|
"types": "./dist/index.d.ts",
|
|
46
|
-
"version": "1.5.0
|
|
46
|
+
"version": "1.5.0"
|
|
47
47
|
}
|