@jgengine/sql 0.10.0 → 0.11.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/CHANGELOG.md +13 -2
- package/LICENSE +203 -661
- package/README.md +1 -1
- package/dist/sqlPersistence.js +21 -18
- package/package.json +4 -4
- package/skills/jgengine/SKILL.md +51 -0
- package/skills/jgengine/api.md +434 -0
- package/skills/jgengine/capabilities.md +29 -0
- package/skills/jgengine/reference-cartridge.md +72 -0
- package/skills/jgengine-multiplayer/SKILL.md +36 -0
- package/skills/jgengine-multiplayer/api.md +611 -0
- package/skills/jgengine-multiplayer/capabilities.md +9 -0
- package/skills/jgengine-multiplayer/reference.md +69 -0
- package/llms.txt +0 -881
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: jgengine-multiplayer
|
|
3
|
+
description: Design authority, transport, replication, sessions, and host persistence.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# JGengine multiplayer
|
|
7
|
+
|
|
8
|
+
## Ownership
|
|
9
|
+
|
|
10
|
+
This skill owns network topology, authority, transports, sessions/presence, replication/projection, reconnect, hosted runners, and persistence adapters. Serializable game state and save semantics stay in `jgengine-gameplay`.
|
|
11
|
+
|
|
12
|
+
Use [capabilities.md](capabilities.md) for intent-to-import discovery, [api.md](api.md) for signatures, and [reference.md](reference.md) for transport, host, projection, persistence, and deployment recipes.
|
|
13
|
+
|
|
14
|
+
## Canonical workflow
|
|
15
|
+
|
|
16
|
+
1. Choose authority and trust boundaries before transport.
|
|
17
|
+
2. Keep commands/intents separate from authoritative state transitions.
|
|
18
|
+
3. Define serializable snapshots/deltas and viewer-specific projection.
|
|
19
|
+
4. Select a transport pipe and host adapter without changing game protocol.
|
|
20
|
+
5. Add reconnect, idempotency, persistence cadence, and failure behavior.
|
|
21
|
+
6. Test multiple clients, visibility boundaries, and restore/rejoin behavior.
|
|
22
|
+
|
|
23
|
+
## Design rules
|
|
24
|
+
|
|
25
|
+
- Protocol and state contracts live below concrete server/browser adapters.
|
|
26
|
+
- Replication is bounded by rooms, interest, change detection, or projection—not global broadcast/full serialization.
|
|
27
|
+
- Private state is filtered authoritatively; UI hiding is not security.
|
|
28
|
+
- Persistence adapters accept structural interfaces and keep backend dependencies out of core.
|
|
29
|
+
- Deterministic ids and commands make retries/reconnect safe.
|
|
30
|
+
|
|
31
|
+
## Traps
|
|
32
|
+
|
|
33
|
+
- Local loopback success does not prove authority or privacy.
|
|
34
|
+
- Presence/chat/voice are session channels, not game-state ownership.
|
|
35
|
+
- Do not couple a primitive to WebSocket, Convex, Postgres, or one deployment topology.
|
|
36
|
+
- Reward allocation, inventory mutation, and progression policy remain gameplay/combat concerns.
|