@genex-ai/multiplayer 0.17.0 → 0.17.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/PROTOCOL.md +4 -3
- package/README.md +2 -1
- package/dist/bridge.global.js +7 -7
- package/dist/bridge.js +1 -1
- package/dist/{chunk-CTDU4IJ5.js → chunk-3ZUPU3GT.js} +67 -6
- package/dist/index.d.ts +9 -8
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/PROTOCOL.md
CHANGED
|
@@ -33,10 +33,11 @@ The key words MUST, MUST NOT, SHOULD, SHOULD NOT and MAY are used as in RFC 2119
|
|
|
33
33
|
|
|
34
34
|
The embed layer supplies a list of regional relay URLs (`getColyseusUrls()` from `@genex-ai/embed-sdk`; the API returns it as `colyseus.urls` with the embed session).
|
|
35
35
|
- With one URL, the client uses it.
|
|
36
|
-
- With several, it SHOULD measure latency to each (Colyseus `getLatency`
|
|
37
|
-
- An explicit invite URL (a friend's region) MUST override selection.
|
|
36
|
+
- With several, it SHOULD measure latency to each (Colyseus `getLatency`) and use the lowest. A probe is a preference, never a gate: when a relay does not answer in time, the client MUST still join — the lowest-latency relay that did answer, else the first URL. (Colyseus `Client.selectByLatency` throws instead; the TS SDK does not use it.)
|
|
37
|
+
- An explicit invite URL (a friend's region) MUST override selection.
|
|
38
|
+
- Regional relays MAY share presence (one room registry). Then every relay serves every room: two players meet whichever relay each enters through, and a seat reservation's `publicAddress` names the relay process that owns the room. Without shared presence, rooms exist per relay, so two players share a room only if they share a URL.
|
|
38
39
|
|
|
39
|
-
A client MUST keep using the chosen URL for the life of a session, across reconnects and seat reservations.
|
|
40
|
+
A client MUST keep using the chosen URL for the life of a session, across reconnects and seat reservations — as its matchmaking and reconnect entry. The room socket itself goes where the reservation says: `<publicAddress>/<processId>/<roomId>` when `publicAddress` is present (every official Colyseus SDK does this), else the chosen URL.
|
|
40
41
|
|
|
41
42
|
### 3.2 Embed token
|
|
42
43
|
|
package/README.md
CHANGED
|
@@ -581,7 +581,8 @@ not the page a friend should land on. Any parameter name works except the platfo
|
|
|
581
581
|
(`embed`, `ref`, `s`, `from`, `remix`, `slug`, and everything starting `genex_`).
|
|
582
582
|
|
|
583
583
|
`joinPrivate` rejects when the code does not lead to a lobby this player can reach: it has
|
|
584
|
-
closed, or
|
|
584
|
+
closed, or (only where the regional relays do not share presence) its host is on another
|
|
585
|
+
region's relay than this player's nearest one. Catch it
|
|
585
586
|
and show the menu. Keep the typed code as the second way in: a shell that does not pass the
|
|
586
587
|
link's parameter on yet opens the game without it.
|
|
587
588
|
|