@genex-ai/cli-demo 0.93.0-dev.236 → 0.93.0-dev.239
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genex-ai/cli-demo",
|
|
3
|
-
"version": "0.93.0-dev.
|
|
3
|
+
"version": "0.93.0-dev.239",
|
|
4
4
|
"description": "Set up your project's agent workspace (.claude/.codex/.cursor in the game folder), authorize, create a game project, generate AI assets, and publish (genex CLI).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -46,10 +46,10 @@ npm i @genex-ai/multiplayer@^0.12.0
|
|
|
46
46
|
> landed in 0.10; confirmed object controls, snaps, host-tick teardown, and reconnect rebasing
|
|
47
47
|
> in 0.9. An older resolve does not have those.
|
|
48
48
|
|
|
49
|
-
This skill targets `@genex-ai/multiplayer` **≥ 0.
|
|
49
|
+
This skill targets `@genex-ai/multiplayer` **≥ 0.13.0** (`objects`/`host` since 0.4; verified per-player `avatarUrl` since 0.12;
|
|
50
50
|
`matchmake()` since 0.5; private lobbies since 0.7; auto-reconnect + `inputs`/`onHostTick`
|
|
51
51
|
since 0.8; soft ownership handoff since 0.8.4; confirmed controls, snap epochs, and host-tick
|
|
52
|
-
lifecycle guarantees since 0.9; regional relay selection via `getColyseusUrls()` since 0.10;
|
|
52
|
+
lifecycle guarantees since 0.9; regional relay selection via `getColyseusUrls()` since 0.10; host-only `setRoomOpen()` since 0.13;
|
|
53
53
|
exact-relay `url` overrides for cross-region invites since 0.11).
|
|
54
54
|
|
|
55
55
|
## Trust model (say it plainly in your game's copy)
|
|
@@ -598,6 +598,23 @@ fights (many writers). A ball on `objects` glides and has one owner. That's the
|
|
|
598
598
|
|
|
599
599
|
The same rule covers anything else you lazily load per player or per object (nameplates, weapon
|
|
600
600
|
models, audio): a check that straddles an `await` is not a guard.
|
|
601
|
+
- `room.setRoomOpen(open)` — **host only.** Stop (or resume) the matchmaker putting NEW players
|
|
602
|
+
into THIS room. A lobby game needs this: once your match starts, arrivals would otherwise be
|
|
603
|
+
dropped into a fight already in progress. Close the room at match start and the next arrival
|
|
604
|
+
forms the NEXT room instead; reopen when you return to the lobby. Everyone already inside keeps
|
|
605
|
+
playing, and a reconnecting player still gets back in (reconnection uses a reserved seat, not
|
|
606
|
+
matchmaking). A non-host call is ignored, so check `isHost` first — and because the host can
|
|
607
|
+
change, re-assert it on `on('host')` rather than only once at match start:
|
|
608
|
+
|
|
609
|
+
```ts
|
|
610
|
+
function startMatch() {
|
|
611
|
+
if (room.isHost) room.setRoomOpen(false); // late arrivals form the next lobby
|
|
612
|
+
}
|
|
613
|
+
function backToLobby() {
|
|
614
|
+
if (room.isHost) room.setRoomOpen(true);
|
|
615
|
+
}
|
|
616
|
+
room.on("room:open", ({ open }) => showLobbyClosedBadge(!open)); // every client is told
|
|
617
|
+
```
|
|
601
618
|
- `room.activePlayers` — the connected-only subset of `room.players`; use its size for live quorum.
|
|
602
619
|
- `room.objects` — shared objects nobody owns until claimed (a ball, an NPC):
|
|
603
620
|
- `claim(id)` — **legacy** optimistic request. It flips local ownership immediately and is corrected
|