@series-inc/rundot-syncplay 6.0.0-rc.35 → 6.0.0-rc.36
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/MIGRATING-RC35-TO-RC36.md +40 -0
- package/core/src/physics/physics-profile-wasm-module.generated.mjs +1 -1
- package/core/src/physics/physics-wasm-module.generated.mjs +1 -1
- package/core/src/physics2d/physics2d-wasm-module.generated.mjs +1 -1
- package/dist/physics/3d.js +25 -4
- package/package.json +3 -2
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Migrating from Syncplay 6.0.0-rc.35 to rc.36
|
|
2
|
+
|
|
3
|
+
This release has no API changes. A game needs no code change.
|
|
4
|
+
|
|
5
|
+
## Behavior changes
|
|
6
|
+
|
|
7
|
+
### A checkpoint restore reads far hull shapes again only when a shape changed
|
|
8
|
+
|
|
9
|
+
The portal code keeps the extents of each body shape. In rc.35, the first
|
|
10
|
+
step after every `restoreCheckpoint` read the shape of every cached body
|
|
11
|
+
again, also when no shape had changed since the capture. With many hulls or
|
|
12
|
+
meshes, this added time to each rollback.
|
|
13
|
+
|
|
14
|
+
From rc.36, a restore skips that check when no body was created, edited, or
|
|
15
|
+
removed since the checkpoint was captured. A restore from serialized bytes
|
|
16
|
+
(`restore`, `importCheckpoint`) always checks. Results are the same as in
|
|
17
|
+
rc.35: digests, contacts, and straddlers do not change.
|
|
18
|
+
|
|
19
|
+
A restore that removes a body created after the capture still checks every
|
|
20
|
+
entry. A later body that gets the same id gets fresh extents.
|
|
21
|
+
|
|
22
|
+
## An rc.35 change that the rc.35 notes did not list
|
|
23
|
+
|
|
24
|
+
### Reopening a pair is not a crossing
|
|
25
|
+
|
|
26
|
+
In rc.34, a body kept its crossing history while every pair was closed. A
|
|
27
|
+
body that moved past the plane of a closed end jumped to the linked end when
|
|
28
|
+
the pair opened again. A rollback to a checkpoint from the closed time
|
|
29
|
+
repeated the jump, because the checkpoint kept the old history.
|
|
30
|
+
|
|
31
|
+
From rc.35, a body's crossing history lasts one step. When no pair is open,
|
|
32
|
+
the history is cleared. A body that moves past a closed end stays where it
|
|
33
|
+
is when the pair opens again, also after a rollback. To cross, the body must
|
|
34
|
+
move through the open end. The test "review 27: crossing history does not
|
|
35
|
+
outlive a jump, a closed pair, or a removed body" covers this behavior.
|
|
36
|
+
|
|
37
|
+
## Release process
|
|
38
|
+
|
|
39
|
+
The publish workflow now waits up to 30 minutes for the npm registry to show
|
|
40
|
+
a new version, before it creates the GitHub release.
|
|
@@ -23,7 +23,7 @@ export const physicsProfileWasmMetadata = Object.freeze({
|
|
|
23
23
|
"sourceHash": "526b1b23868ee85c5ad4c941b6285aef42b1ec1cd7be5ca5e597f237cee45fe1",
|
|
24
24
|
"wasmSha256": "90338a158932a5e26c281b6e25fac51a3a812fa90d1be9bdc8009fb2c27b8775",
|
|
25
25
|
"artifact": "profile",
|
|
26
|
-
"packageVersion": "6.0.0-rc.
|
|
26
|
+
"packageVersion": "6.0.0-rc.36",
|
|
27
27
|
"compilerFlags": [
|
|
28
28
|
"-std=c++20",
|
|
29
29
|
"-O3",
|
|
@@ -23,7 +23,7 @@ export const physicsWasmMetadata = Object.freeze({
|
|
|
23
23
|
"sourceHash": "6a94acc517813ca4584435ed14f1e9cd2fd0d7c189cdd91b6a492940c4580366",
|
|
24
24
|
"wasmSha256": "bcae5dd51d328a0314df1187efc8cbb0cce9a7fbac2b03cc775f25c4650f9de1",
|
|
25
25
|
"artifact": "production",
|
|
26
|
-
"packageVersion": "6.0.0-rc.
|
|
26
|
+
"packageVersion": "6.0.0-rc.36",
|
|
27
27
|
"compilerFlags": [
|
|
28
28
|
"-std=c++20",
|
|
29
29
|
"-O3",
|
|
@@ -50,7 +50,7 @@ export const physics2dWasmMetadata = Object.freeze({
|
|
|
50
50
|
"sourceHash": "faa090a03a6fddaf79c704fb1d76f810955ff35597449c8cec9541a75905a37e",
|
|
51
51
|
"wasmSha256": "49cb90541deed40f5fff1015bb578e13ec9a793d51931c1227e3e5a11bbfa3f7",
|
|
52
52
|
"artifact": "production",
|
|
53
|
-
"packageVersion": "6.0.0-rc.
|
|
53
|
+
"packageVersion": "6.0.0-rc.36",
|
|
54
54
|
"compilerFlags": [
|
|
55
55
|
"-std=c++20",
|
|
56
56
|
"-O3",
|
package/dist/physics/3d.js
CHANGED
|
@@ -2467,6 +2467,15 @@ class PortalSimulatorManager {
|
|
|
2467
2467
|
// change keeps the entries: the extents are in the body frame.
|
|
2468
2468
|
shapeExtents = new Map();
|
|
2469
2469
|
shapesNeedCheck = false;
|
|
2470
|
+
// The number of events that may have changed a body shape: a creation,
|
|
2471
|
+
// edit or removal, and a restore that is not known to keep every shape. A
|
|
2472
|
+
// creation counts because a restore removes a body created after the
|
|
2473
|
+
// capture, and the next creation can reuse its id with another shape. Never
|
|
2474
|
+
// restored, so it only grows. A captured state records the count at its
|
|
2475
|
+
// capture (shapeStamps, not serialized): restoring a state with the current
|
|
2476
|
+
// count changes no shape, and the cached extents stay valid without a check.
|
|
2477
|
+
shapeEvents = 0;
|
|
2478
|
+
shapeStamps = new WeakMap();
|
|
2470
2479
|
// The cached extents of a body, or undefined. After a restore, the first
|
|
2471
2480
|
// call drops every entry whose shape changed.
|
|
2472
2481
|
cachedExtents(raw, id) {
|
|
@@ -2490,8 +2499,12 @@ class PortalSimulatorManager {
|
|
|
2490
2499
|
return this.shapeExtents.get(id);
|
|
2491
2500
|
}
|
|
2492
2501
|
// Drops the cached extents of every body that a native batch edits or
|
|
2493
|
-
// removes. A created body has a
|
|
2502
|
+
// removes. A created body has no entry: a removal drops the entry of its
|
|
2503
|
+
// id, and a restore that drops a body created after its capture checks
|
|
2504
|
+
// every entry.
|
|
2494
2505
|
forgetShapes(commands) {
|
|
2506
|
+
if (commands.some((command) => command.type === 'createBody' || command.type === 'editBody' || command.type === 'removeBody'))
|
|
2507
|
+
this.shapeEvents += 1;
|
|
2495
2508
|
if (this.shapeExtents.size === 0)
|
|
2496
2509
|
return;
|
|
2497
2510
|
for (const command of commands) {
|
|
@@ -2863,6 +2876,7 @@ class PortalSimulatorManager {
|
|
|
2863
2876
|
this.lastRulesEmpty = false;
|
|
2864
2877
|
this.bodyKeyToId.clear();
|
|
2865
2878
|
this.bodyIdToKey.clear();
|
|
2879
|
+
this.shapeEvents += 1;
|
|
2866
2880
|
this.shapesNeedCheck = true;
|
|
2867
2881
|
this.clearEphemeralState();
|
|
2868
2882
|
}
|
|
@@ -3649,7 +3663,9 @@ class PortalSimulatorManager {
|
|
|
3649
3663
|
if (input === undefined)
|
|
3650
3664
|
return undefined;
|
|
3651
3665
|
const record = { ...base, signature: proxySignature(input) };
|
|
3652
|
-
const
|
|
3666
|
+
const commands = [{ type: 'createBody', key: 1, ...encodeBody(input) }];
|
|
3667
|
+
const result = raw.applyBatch(commands);
|
|
3668
|
+
this.forgetShapes(commands);
|
|
3653
3669
|
const id = result.bodies[0].handle.id;
|
|
3654
3670
|
this.proxies.set(id, record);
|
|
3655
3671
|
this.proxyByKey.set(key, id);
|
|
@@ -3938,7 +3954,7 @@ class PortalSimulatorManager {
|
|
|
3938
3954
|
open: p.open,
|
|
3939
3955
|
});
|
|
3940
3956
|
}
|
|
3941
|
-
|
|
3957
|
+
const state = {
|
|
3942
3958
|
nextId: this.nextId,
|
|
3943
3959
|
pairs: pairsCopy,
|
|
3944
3960
|
priorBodyPlanes: Array.from(this.priorBodyPlanes.entries()),
|
|
@@ -3976,10 +3992,15 @@ class PortalSimulatorManager {
|
|
|
3976
3992
|
lastStraddlers: this.lastStraddlers.map((entry) => [entry.bodyId.toString(), entry.pairId, entry.end]),
|
|
3977
3993
|
}),
|
|
3978
3994
|
};
|
|
3995
|
+
this.shapeStamps.set(state, this.shapeEvents);
|
|
3996
|
+
return state;
|
|
3979
3997
|
}
|
|
3980
3998
|
restoreState(state) {
|
|
3981
3999
|
this.invalidateBubbles();
|
|
3982
|
-
this.
|
|
4000
|
+
if (this.shapeStamps.get(state) !== this.shapeEvents) {
|
|
4001
|
+
this.shapeEvents += 1;
|
|
4002
|
+
this.shapesNeedCheck = true;
|
|
4003
|
+
}
|
|
3983
4004
|
this.nextId = state.nextId;
|
|
3984
4005
|
this.pairs.clear();
|
|
3985
4006
|
this.hostBodies.clear();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@series-inc/rundot-syncplay",
|
|
3
|
-
"version": "6.0.0-rc.
|
|
3
|
+
"version": "6.0.0-rc.36",
|
|
4
4
|
"description": "Kinetix orchestration, rollback, replay, late-join, and deterministic networking for RUN.game",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -210,7 +210,8 @@
|
|
|
210
210
|
"MIGRATING-RC28-TO-RC29.md",
|
|
211
211
|
"MIGRATING-RC31-TO-RC32.md",
|
|
212
212
|
"MIGRATING-RC33-TO-RC34.md",
|
|
213
|
-
"MIGRATING-RC34-TO-RC35.md"
|
|
213
|
+
"MIGRATING-RC34-TO-RC35.md",
|
|
214
|
+
"MIGRATING-RC35-TO-RC36.md"
|
|
214
215
|
],
|
|
215
216
|
"sideEffects": [
|
|
216
217
|
"./core/scripts/emit-product-digests.mjs",
|