lokiplay 0.4.1 → 0.4.3
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/dist/AGENTS.template.md +33 -24
- package/package.json +2 -2
package/dist/AGENTS.template.md
CHANGED
|
@@ -78,32 +78,41 @@
|
|
|
78
78
|
`authority` is `"server"` — `step`. Report the richer profile in the
|
|
79
79
|
final report: values, supporting evidence, and creator-confirmed
|
|
80
80
|
decisions.
|
|
81
|
-
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
81
|
+
- Classify authority from the code that advances match state, not from the
|
|
82
|
+
genre or the frame rate. Turn-based or event-driven means that state
|
|
83
|
+
changes only when a player action is committed. Continuous realtime means
|
|
84
|
+
state advances on a tick even when nobody has just pressed a button. If
|
|
85
|
+
that reading is ambiguous, stop and ask the creator what the match state
|
|
86
|
+
depends on. Do not guess.
|
|
87
|
+
- One `game.json` has one `authority` for the whole project. If modes
|
|
88
|
+
disagree, say so and ask which one this project is.
|
|
89
|
+
- Host is more suitable for turn-based and event-driven games. Write
|
|
90
|
+
`"authority": "host"`, omit `step`, and use `createSynchronizedRoom()`.
|
|
91
|
+
- Server is more suitable for continuous realtime games. Tell the creator
|
|
92
|
+
what the update path does, then ask them to confirm server. Write
|
|
93
|
+
`"authority": "server"` and `step`. Do not elect a player host. Server
|
|
94
|
+
rooms are browser-only, run in Singapore, and end if the step fails; they
|
|
95
|
+
do not fall back to a player. That is fairness, not lower latency.
|
|
96
|
+
- Before compiling `step`, change the state update so the next state depends
|
|
97
|
+
only on the previous state and this tick's inputs. Drawing, sound, and
|
|
98
|
+
asset loads stay in the browser. If the update reads the DOM, the clock,
|
|
99
|
+
randomness, or assets, remove those calls from it. A seed or the tick
|
|
100
|
+
index, when the game needs one, is an input field, not something the
|
|
101
|
+
module reads itself. If you cannot make that change, say so and do not
|
|
102
|
+
write `"authority": "server"`. Host realtime (`createRealtimeRoom()` with
|
|
103
|
+
`"authority": "host"`) can ship until the update is pure; say that is why,
|
|
104
|
+
and do not describe host as the better fit for a continuous game.
|
|
105
|
+
- `step` names a compiled `.wasm` module (`modulePath`) exporting exactly
|
|
106
|
+
one function, `step`, and importing nothing — no WASI, clocks, randomness,
|
|
107
|
+
or host functions. Compile it yourself. The validator rejects imports, and
|
|
108
|
+
the worker never mounts anything else.
|
|
109
|
+
- A later switch is another deploy after the creator confirms again. Rooms
|
|
110
|
+
already open keep the authority they started with.
|
|
102
111
|
- After inspecting and confirming each game mode's profile, choose
|
|
103
112
|
`createSynchronizedRoom()` for turn-based or event-driven state, or
|
|
104
|
-
`createRealtimeRoom()` for continuous
|
|
105
|
-
|
|
106
|
-
|
|
113
|
+
`createRealtimeRoom()` for continuous realtime. Do not choose by genre or
|
|
114
|
+
animation smoothness; choose by how authoritative state actually
|
|
115
|
+
progresses. Do not run both room types for the same mode.
|
|
107
116
|
- `createSynchronizedRoom()`: define project-owned state and actions, then
|
|
108
117
|
provide a reducer. Do not implement a parallel authority, version, or
|
|
109
118
|
membership protocol.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lokiplay",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "Command-line tools for Loki game projects and deployments.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@lokiplay/protocol": "0.4.
|
|
42
|
+
"@lokiplay/protocol": "0.4.3",
|
|
43
43
|
"fflate": "^0.8.3"
|
|
44
44
|
}
|
|
45
45
|
}
|