@zaisma/game-server 1.40.0 → 1.41.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 +1 -1
- package/bench/glass.js +400 -596
- package/bin/like-zaisma.d.ts +15 -0
- package/bin/like-zaisma.js +252 -0
- package/bin/local-play-runner.js +35 -7
- package/bin/local-play.js +19 -1
- package/bin/node-parts.js +32 -3
- package/bin/node.js +76 -0
- package/package.json +1 -1
- package/sdk/zaisma.js +18 -2
- package/src/internal.d.ts +1 -0
- package/src/internal.js +1 -0
- package/src/sandbox-limits.d.ts +32 -0
- package/src/sandbox-limits.js +41 -0
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Write a game server once; run it in Zaisma's rooms or on your own Node server. Rooms, players, state sync, chat, the game's database and its requests behave the same in both.
|
|
4
4
|
|
|
5
|
-
To play your multiplayer game on your own computer before you upload it, run `npx @zaisma/game-server@1 play-locally` in the game's folder (or `npx @zaisma/cli play-locally`, which runs it). It serves the game, runs its game server, and opens a test bench: each player on Zaisma's own game page, guests until they sign in with a name, and a dev bar whose Add a player opens another tab as a new player, with passes signed by a key of its own, so two tabs play together with no account, key or internet. Flags: `[folder]`, `--port 4800`, `--game <slug>`, `--on-network`, `--no-open`, `--json`; Zaisma's README has the whole of it under "Play it on your own computer".
|
|
5
|
+
To play your multiplayer game on your own computer before you upload it, run `npx @zaisma/game-server@1 play-locally` in the game's folder (or `npx @zaisma/cli play-locally`, which runs it). When it starts, it asks npm whether a newer bench is out and, if one is, says so in one line: run it again to use it, or, where your project or computer installed an older one, the `npm install` that moves it up. Offline, or on the latest, it says nothing and never waits. It serves the game, runs its game server, and opens a test bench: each player on Zaisma's own game page, guests until they sign in with a name, and a dev bar whose Add a player opens another tab as a new player, with passes signed by a key of its own, so two tabs play together with no account, key or internet. Flags: `[folder]`, `--port 4800`, `--game <slug>`, `--on-network`, `--no-open`, `--json`; Zaisma's README has the whole of it under "Play it on your own computer".
|
|
6
6
|
|
|
7
7
|
```ts
|
|
8
8
|
// server.ts
|