incanto 0.66.0 → 0.67.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/bin/_behaviors-loader.mjs +87 -0
- package/bin/incanto-editor.mjs +39 -2
- package/bin/incanto-feel.mjs +4 -1
- package/bin/incanto-frame.mjs +52 -3
- package/bin/incanto-logs.mjs +33 -3
- package/bin/incanto-multiplay.mjs +50 -1
- package/bin/incanto-play.mjs +3 -1
- package/bin/incanto-playtest.mjs +3 -25
- package/bin/incanto-verify.mjs +15 -2
- package/dist/2d.d.ts +41 -4
- package/dist/2d.js +3 -3
- package/dist/3d.d.ts +86 -14
- package/dist/3d.js +6 -6
- package/dist/{audio-player-_UAcHxnC.d.ts → audio-player-BNUHo0JF.d.ts} +1 -1
- package/dist/{behavior-BXNLfIJk.d.ts → behavior-ZnfzKDo3.d.ts} +39 -1
- package/dist/{create-game-Dd7H4bJV.js → create-game-DMetd3vR.js} +14 -8
- package/dist/{create-game-DYJCIzO0.js → create-game-FAXdHta3.js} +77 -11
- package/dist/debug.d.ts +1 -1
- package/dist/debug.js +3 -2
- package/dist/{duplicate-CqSAtdrh.js → duplicate-B8QnX2-r.js} +1 -1
- package/dist/editor.js +7 -2
- package/dist/{environment-presets-BlPsEmq6.js → environment-presets-C-5g2pMh.js} +46 -6
- package/dist/{gameplay-D1RADWu3.js → gameplay-CGSv-9XR.js} +28 -5
- package/dist/gameplay.d.ts +25 -4
- package/dist/gameplay.js +1 -1
- package/dist/index.d.ts +50 -6
- package/dist/index.js +7 -6
- package/dist/{loader-Cga7FVP4.d.ts → loader-DyT30ArB.d.ts} +1 -1
- package/dist/{loader-lQDCwNag.js → loader-KZESOZmE.js} +148 -1
- package/dist/net.d.ts +2 -2
- package/dist/net.js +1 -1
- package/dist/{physics-2d-Cji5A6sX.js → physics-2d-_B6zj3zU.js} +29 -2
- package/dist/{physics-3d-BkHjwJgI.js → physics-3d-i1IeAY0F.js} +30 -3
- package/dist/react.d.ts +1 -1
- package/dist/react.js +1 -1
- package/dist/{register-BmuqYTiY.js → register-Cs53CY7s.js} +81 -16
- package/dist/{register-D0CxCveZ.js → register-vIxU3Xbv.js} +3 -3
- package/dist/rendering-options-ByAdi8PF.js +184 -0
- package/dist/{replay-IsZbNu6d.js → replay-BkpDV51O.js} +4 -3
- package/dist/{replay-BHoB6fCU.d.ts → replay-D0GcEHYU.d.ts} +1 -1
- package/dist/{split-screen-eJUFjhi1.d.ts → split-screen-DD5eYIgW.d.ts} +2 -2
- package/dist/{split-screen-D_i7GRcY.js → split-screen-DS8RaUV_.js} +2 -2
- package/dist/{src-BTLbXFPZ.js → src-BLlsGJW9.js} +1 -1
- package/dist/{teardown-byR9USax.js → teardown-LB9cTnXJ.js} +2 -2
- package/dist/{test-DgrD0jHD.js → test-81uZ967a.js} +127 -24
- package/dist/test.d.ts +7 -5
- package/dist/test.js +2 -2
- package/dist/{touch-DESwnpOc.js → touch-DEAmqGdf.js} +30 -186
- package/dist/vite.d.ts +0 -7
- package/dist/vite.js +13 -3
- package/editor/assets/{agent8-9N-Pd_YS.js → agent8-C2jtNKbx.js} +1 -1
- package/editor/assets/debug-DoU3KeqS.js +3 -0
- package/editor/assets/{index-CeDhIPTC.js → index-CNqHojcC.js} +92 -92
- package/editor/index.html +1 -1
- package/package.json +1 -1
- package/schemas/scene.schema.json +1 -1
- package/skills/incanto-building-3d-games.md +19 -0
- package/skills/incanto-editor.md +5 -1
- package/skills/incanto-environment.md +2 -2
- package/skills/incanto-gameplay-behaviors.md +1 -1
- package/skills/incanto-hud.md +14 -1
- package/skills/incanto-multiplayer.md +14 -0
- package/skills/incanto-node-reference.md +1 -1
- package/skills/incanto-performance.md +35 -0
- package/skills/incanto-playtesting.md +15 -1
- package/skills/incanto-save-slots.md +21 -1
- package/skills/incanto-verifying-your-game.md +19 -0
- package/skills/incanto-your-first-game.md +4 -4
- package/templates-app/beacon-isle-3d/package.json +1 -1
- package/templates-app/beacon-isle-3d/src/game.scene.json +38 -19
- package/templates-app/platformer-2d/package.json +1 -1
- package/templates-app/platformer-2d/src/game.scene.json +99 -53
- package/templates-app/star-survivor/package.json +1 -1
- package/templates-app/star-survivor/src/game.scene.json +31 -17
- package/templates-app/tps-3d/package.json +1 -1
- package/templates-app/tps-3d/src/game.scene.json +14 -8
- package/templates-app/village-quest-3d/package.json +1 -1
- package/templates-app/village-quest-3d/src/grove.scene.json +20 -11
- package/templates-app/village-quest-3d/src/village.scene.json +10 -7
- package/editor/assets/debug-CkbJICYp.js +0 -3
package/editor/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Incanto Scene Editor</title>
|
|
7
7
|
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><rect width='16' height='16' rx='3' fill='%236ee7dc'/><text x='8' y='12' text-anchor='middle' font-size='11' font-family='monospace' fill='%230e1018'>i</text></svg>" />
|
|
8
|
-
<script type="module" crossorigin src="./assets/index-
|
|
8
|
+
<script type="module" crossorigin src="./assets/index-CNqHojcC.js"></script>
|
|
9
9
|
<link rel="modulepreload" crossorigin href="./assets/GameServer-C56iOUgF.js">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
package/package.json
CHANGED
|
@@ -41,8 +41,14 @@ const game = await createGame3D({
|
|
|
41
41
|
scene: sceneJson, // cloned internally — no cast, no structuredClone
|
|
42
42
|
pointer: true, // pointer-look + lock-on-click (FPS pattern); default off
|
|
43
43
|
// behaviors: { ... }, // registered for you (hot-replace tolerant)
|
|
44
|
+
// settings: { namespace: 'my-game' }, // ← if anything else Incanto is
|
|
45
|
+
// served from this domain. Volume, language and the quality tier persist
|
|
46
|
+
// under `incanto:<namespace>:`, and the default is shared by everyone: a
|
|
47
|
+
// neighbouring game's player can boot yours at quarter resolution, muted.
|
|
44
48
|
});
|
|
45
49
|
// game.engine / game.scene / game.renderer / game.physics
|
|
50
|
+
// `game.scene` is the LIVE scene, not the one you booted with — it follows every
|
|
51
|
+
// swap, including `flow.restart()`. `game.sourceJson` is the authored JSON.
|
|
46
52
|
// game.dispose() — ONE call tears everything down (SPA unmount)
|
|
47
53
|
```
|
|
48
54
|
|
|
@@ -629,3 +635,16 @@ or empty, and nothing throws.
|
|
|
629
635
|
headless bot sessions and reports what could not be reached, which wires never
|
|
630
636
|
fired, and whether anything in the level can hurt the player. See
|
|
631
637
|
`incanto-playtesting.md`.
|
|
638
|
+
|
|
639
|
+
|
|
640
|
+
### `findFloatingProps` throws rather than reporting a clean scene it never read
|
|
641
|
+
|
|
642
|
+
It answers "which props hover above the terrain", and it needs the scene to LOAD
|
|
643
|
+
and a `Terrain3D` to measure against. It used to return `[]` for both failures —
|
|
644
|
+
so a scene that would not load, a scene with no terrain and a genuinely clean
|
|
645
|
+
scene all printed the same green.
|
|
646
|
+
|
|
647
|
+
It stubs unregistered behaviors (it measures geometry, not logic; a scene with
|
|
648
|
+
any custom behavior used to read as clean — measured 0 floating before
|
|
649
|
+
`registerBehavior`, 26 after) and throws when it cannot measure. A level built
|
|
650
|
+
from mesh floors has no terrain height to read: use a physics raycast instead.
|
package/skills/incanto-editor.md
CHANGED
|
@@ -44,7 +44,11 @@ The `scenes` button opens the project as a tree, not a list of paths:
|
|
|
44
44
|
panel — so `⏎` loads something without arrowing first.
|
|
45
45
|
- Each row carries **when it was last written and how big it is**, which is usually
|
|
46
46
|
how you recognise the file you were just in.
|
|
47
|
-
- **create** makes a new scene at the path in the box —
|
|
47
|
+
- **create** makes a new scene at the path in the box — **matching the project**:
|
|
48
|
+
a 3D game gets `dimension: "3d"` with a `Node3D` root, a 2D game gets 2D, read
|
|
49
|
+
from the scenes already on disk. It used to hardcode 2D for everyone, and node
|
|
50
|
+
types are immutable by design, so a 3D author's new scene could only be deleted
|
|
51
|
+
and re-made by hand — left empty it uses the
|
|
48
52
|
placeholder, which tracks the folder you are standing in, so a scene lands beside
|
|
49
53
|
its siblings rather than at the project root. Parent dirs are created.
|
|
50
54
|
- Loading another scene while you have unsaved EDITS asks first, and the answer
|
|
@@ -799,7 +799,7 @@ hue reads grey.
|
|
|
799
799
|
| `sunDirection` | `[0.5, 0.8, 0.3]` | TOWARD the sun, for the specular glint — match the scene's key light (non-zero, load-time check) |
|
|
800
800
|
| `sunColor` | `"#fff5d6"` | glint/sheen tint |
|
|
801
801
|
| `sunIntensity` | `1` | glint/sheen strength (≥ 0; 0 = off) |
|
|
802
|
-
| `detailStrength` | `0.
|
|
802
|
+
| `detailStrength` | `0.26` | animated detail-normal strength (≥ 0; 0 = vertex normals only) |
|
|
803
803
|
| `absorption` | `0.15` | Beer's-law constant per meter of water depth (≥ 0; lower = clearer/wider turquoise band; red absorbs ~3× faster than blue under the hood) |
|
|
804
804
|
| `refraction` | `true` | screen-space refraction of the submerged scene |
|
|
805
805
|
| `preset` | `"custom"` | **THE one-choice water type** (0.16.0): `ocean` \| `pool` \| `lake` \| `pond` bundles every wave/color/clarity/caustics knob into a hand-tuned sea state. A preset value applies ONLY where a prop still sits at its schema default — pick the type, then override any detail prop and your value wins. ocean = traveling swell + whitecaps + wide turquoise→deep absorption · pool = near-flat crystal water + strong above-water caustics · lake = calm high-reflectivity mirror, green-teal murk · pond = still, mossy, opaque quickly. `custom` (default) changes nothing |
|
|
@@ -1074,7 +1074,7 @@ underneath decides everything else.
|
|
|
1074
1074
|
| `opacity` | `0.85` | upper bound on the body's opacity |
|
|
1075
1075
|
| `foam` | `1` | whitewater dial — 0 = a glassy canal, 2 = raging |
|
|
1076
1076
|
| `ripples` | `1` | surface-detail dial (ripple relief + glitter) |
|
|
1077
|
-
| `terrain` | `
|
|
1077
|
+
| `terrain` | `""` | drape target path; empty = auto-find the first Terrain3D (a wrong path fails at load) |
|
|
1078
1078
|
| `carve` | `true` | cut the bed. The river trenches its own channel into the terrain it drapes on — see below |
|
|
1079
1079
|
| `flowForce` | `1` | how hard the current sweeps bodies downstream (0 = visual only) |
|
|
1080
1080
|
| `spray` | `1` | mist at the foot of every drop the course turns out to contain — the node finds them and hangs a Particles3D plume on each (0 = off) |
|
|
@@ -111,7 +111,7 @@ what breaks one that forgets the other half:
|
|
|
111
111
|
|
|
112
112
|
```json
|
|
113
113
|
{ "signal": "died", "from": "Player", "to": "Score", "handler": "loseLife" },
|
|
114
|
-
{ "signal": "lifeLost", "from": "Score", "to": "Player", "handler": "
|
|
114
|
+
{ "signal": "lifeLost", "from": "Score", "to": "Player", "handler": "reviveFull" }
|
|
115
115
|
```
|
|
116
116
|
|
|
117
117
|
Without the second wire the player is a walking corpse after the first death —
|
package/skills/incanto-hud.md
CHANGED
|
@@ -183,7 +183,20 @@ support" was not something a JSON scene could express at all.
|
|
|
183
183
|
```
|
|
184
184
|
|
|
185
185
|
Arrow keys / d-pad move the focus between the **focusable** widgets under that
|
|
186
|
-
layer
|
|
186
|
+
layer — and only the ones the player can actually SEE: a hidden widget hides
|
|
187
|
+
everything under it, and a hidden layer has no ring at all. (Until 0.67 the walk
|
|
188
|
+
recursed into closed panels, so Enter on a title screen could press a button in
|
|
189
|
+
the shop and spend the gold.) `hud.focusables()` returns the ring, so a game can
|
|
190
|
+
ask what it is stuck with.
|
|
191
|
+
|
|
192
|
+
A **`UiDialogue` takes focus while it is up**: Enter/A picks the highlighted
|
|
193
|
+
choice, left/right move between them, and a line with no choices advances. Its
|
|
194
|
+
choices are DOM buttons inside the widget rather than nodes, so this is the
|
|
195
|
+
widget's own key handling — before 0.67 a choice could only be answered with a
|
|
196
|
+
mouse, and `charsPerSecond: 0` rendered no buttons at all, which was an
|
|
197
|
+
unanswerable soft-lock.
|
|
198
|
+
|
|
199
|
+
`Enter` / `A` activates, and the focused one wears a ring.
|
|
187
200
|
`UiButton`/`UiSlider`/`UiToggle`/`UiSelect` are focusable by default;
|
|
188
201
|
`UiText`/`UiBar`/`UiImage`/`UiPanel` are not, so arrowing never lands on a label.
|
|
189
202
|
|
|
@@ -378,3 +378,17 @@ Kernel constraints (agent8 platform facts — don't fight them):
|
|
|
378
378
|
client transport swap (for a normal single-client game, just omit `{transport}`;
|
|
379
379
|
a split-screen demo like arena-preview also drops its local-only scaffolding) PLUS
|
|
380
380
|
deploying `server/` (the "Going live on agent8" section above) — not literally one line.
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
## The `agrees` rung runs YOUR server
|
|
384
|
+
|
|
385
|
+
`incanto-multiplay` loads `server/src/server.ts` (or `--server FILE`) and runs
|
|
386
|
+
the match against it. It did not until 0.67: every match ran on a bare loopback
|
|
387
|
+
kernel with no remote functions, so `roomState` came back `{}` instead of
|
|
388
|
+
`{"matchMs": 5983.3}`, a `manager.call('claimRelic')` threw
|
|
389
|
+
`Loopback kernel has no remote function 'claimRelic'`, and the report still said
|
|
390
|
+
`ok=true errors=0 problems=[]`. Moving `server/src/server.ts` out of the tree
|
|
391
|
+
changed nothing — a ✓ that could not have been a ✗.
|
|
392
|
+
|
|
393
|
+
If your server cannot be loaded the run REFUSES rather than quietly measuring a
|
|
394
|
+
game without its own rules.
|
|
@@ -1039,7 +1039,7 @@ Signals: `dragStarted` · `dragCancelled` · `droppedOn` · `dropped` · `presse
|
|
|
1039
1039
|
|---|---|---|
|
|
1040
1040
|
| `anchor` | `"bottom"` | one of: `topLeft` `top` `topRight` `left` `center` `right` `bottomLeft` `bottom` `bottomRight` |
|
|
1041
1041
|
| `visible` | `true` | boolean |
|
|
1042
|
-
| `focusable` | `
|
|
1042
|
+
| `focusable` | `true` | boolean |
|
|
1043
1043
|
| `draggable` | `false` | boolean |
|
|
1044
1044
|
| `dropTarget` | `false` | boolean |
|
|
1045
1045
|
| `charsPerSecond` | `40` | number |
|
|
@@ -289,3 +289,38 @@ Set `maxFps` to 30 and confirm `fps` settles near 30 — if it settles near 20,
|
|
|
289
289
|
is slower than the cap and the cap is not what is limiting it.
|
|
290
290
|
|
|
291
291
|
See `incanto-verifying-your-game.md` for the full loop.
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
## Identical meshes share their GPU objects
|
|
295
|
+
|
|
296
|
+
`MeshInstance3D` used to make a private geometry AND material per node, even
|
|
297
|
+
when byte-identical. Measured at 3,200 units — all runs at the same 3,209 draw
|
|
298
|
+
calls, 1,741,932 triangles and an identical screenshot:
|
|
299
|
+
|
|
300
|
+
```
|
|
301
|
+
per-node geometry + material 31.0 ms wall (renderMs 27.3)
|
|
302
|
+
share one geometry 27.0 ms
|
|
303
|
+
+ share two materials 15.4 ms <- 2x the headroom
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
13.1 ms of that cliff was GPU state churn from per-node objects. Nodes now share
|
|
307
|
+
one geometry per (mesh, size) and one material per distinct `material` dict, and
|
|
308
|
+
a node whose look changes gets its own again. **Nothing to do — it is the
|
|
309
|
+
default.** The consequence to know: mutate node PROPS, never the three.js
|
|
310
|
+
material you fished out of a node, because it may not be only yours.
|
|
311
|
+
|
|
312
|
+
This does not replace `InstancedMesh3D`. A field of identical props is still one
|
|
313
|
+
node and one draw call there (12,800 units, 11 draw calls, 2.30 ms); sharing
|
|
314
|
+
helps the one-node-per-thing path, which is what a hand-authored level is.
|
|
315
|
+
|
|
316
|
+
## The quality tier only ever takes away
|
|
317
|
+
|
|
318
|
+
`high` no longer mentions `bloom` or `post` at all, because mentioning them
|
|
319
|
+
CREATED them: on a scene that declared neither, `high` and `medium` both
|
|
320
|
+
rendered a five-pass frame at 3.3 ms where `low` rendered one pass at 1.24 ms —
|
|
321
|
+
62% of the frame on a chain the game never asked for, and
|
|
322
|
+
`engine.scene.environment.bloom` read back `{strength: 0.8, threshold: 1}`.
|
|
323
|
+
|
|
324
|
+
A tier is also REVERSIBLE now: it is applied against the scene FILE rather than
|
|
325
|
+
against whatever the last tier left behind, so `low` → `high` restores exactly
|
|
326
|
+
what you authored instead of leaving it stripped.
|
|
@@ -51,10 +51,24 @@ two.
|
|
|
51
51
|
| `fell` | the player left the world past `--fall-below` (default: 50 m under the spawn in 3D, 1000 px under it in 2D) |
|
|
52
52
|
| `error` | `stats().errors` went above zero — a behavior threw |
|
|
53
53
|
| `stuck` | the clock ran out AND the player never got more than 3 m (96 px) from its spawn — it is wedged, or nothing moves it |
|
|
54
|
+
| `swapped` | the game changed scene. The bot binds player, destinations and the win/lose oracle ONCE, from the tree it started in, so nothing after a `goToScene` is measured — the run stops there and says so. It is not a defect, and the destinations it never got to are reported as unmeasured rather than missed. Judge a multi-scene game with a scripted `runScript`. |
|
|
54
55
|
| `unfinished` | the clock ran out on a player that was getting around. Not a defect: a win that needs a SEQUENCE (talk to the NPC, then fetch, then return) is out of reach of a random walker, forever |
|
|
55
56
|
| `never reached` | destinations the bot never came within `--reach-radius` of (default 2 m in 3D, 32 px in 2D) |
|
|
56
57
|
| `never fired` | signals a `connections[]` entry listens to that never happened |
|
|
57
|
-
| `danger` | how many times the player's `Health` emitted `damaged` |
|
|
58
|
+
| `danger` | how many times the player's `Health` emitted `damaged` — and when that is ZERO, WHICH zero it is: a scene with no hazard wired at all is a walkabout and worth shouting about; a scene full of them that never landed one is a report about the BOT, which a real player would outrun less easily. Hazards are counted from the scene FILE, because a `Spawner` detaches its prefab at ready and a wave game's hazards are not in the tree yet. |
|
|
59
|
+
|
|
60
|
+
**The bot can use the MOUSE.** If your scene has `Clickable` nodes, it presses
|
|
61
|
+
and releases over them at random — through the real `Clickable`, the real
|
|
62
|
+
`mouseJustPressed` edge and your real connection, with a picker that answers
|
|
63
|
+
from the tree (the recipe under "Testing a mouse-driven game headlessly"). It
|
|
64
|
+
drove actions and nothing else before, so a tactics game, a tower defense and a
|
|
65
|
+
duel all reported the identical `? plays — 8 runs played without reaching a
|
|
66
|
+
win`. A scene with nothing clickable is untouched: it does not gain an
|
|
67
|
+
`engine.picker` it never had.
|
|
68
|
+
|
|
69
|
+
A random clicker still cannot finish a game that needs a SEQUENCE — select a
|
|
70
|
+
trooper, then a tile, then end the turn — and that is reported as unmeasured,
|
|
71
|
+
not failed.
|
|
58
72
|
|
|
59
73
|
**Nothing here is a guess about your design.** The scene already declares what
|
|
60
74
|
winning is; this only listens.
|
|
@@ -89,7 +89,27 @@ game that shipped six weeks ago. Check what you read.
|
|
|
89
89
|
Built-ins that already save: `Health` (current, dead), `ScoreKeeper` (score,
|
|
90
90
|
lives, won/lost), `Collector` (total).
|
|
91
91
|
|
|
92
|
-
## Every node you save needs a uid
|
|
92
|
+
## Every node you save — and every node that VANISHES — needs a uid
|
|
93
|
+
|
|
94
|
+
A collectible does not save state; it DISAPPEARS, and disappearing is the thing
|
|
95
|
+
the save has to record. `#freed` is keyed by uid, so a pickup without one is
|
|
96
|
+
silently omitted: the score that counted it restores, and the pickup restores
|
|
97
|
+
too. Measured on a starter with 1 uid across 141 nodes:
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
coins after collecting : 9
|
|
101
|
+
save["#freed"] : undefined
|
|
102
|
+
restore report : { restored: 1, expected: 1, freed: 0 }
|
|
103
|
+
coins AFTER load : 12 <- three coins resurrected
|
|
104
|
+
auditScene warnings : [] <- and every checker was green
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
`captureState` now reports this as an ERROR naming the nodes, because the save
|
|
108
|
+
it just wrote is already wrong. It does not guess a replacement: a uid survives
|
|
109
|
+
a rename and a reparent, and a saved PATH would point at whatever node moved
|
|
110
|
+
into that slot after your next edit.
|
|
111
|
+
|
|
112
|
+
|
|
93
113
|
|
|
94
114
|
The uid is the join key, because it is the one identifier that survives a rename
|
|
95
115
|
or a reparent. The editor assigns one to every node it touches. A hand-written
|
|
@@ -858,3 +858,22 @@ const inputToWorld = Math.atan2(at()[1] - before[1], at()[0] - before[0]);
|
|
|
858
858
|
|
|
859
859
|
`examples/village-quest-3d/verify.ts` does exactly this and fails with
|
|
860
860
|
"the player cannot reach it on foot" when it cannot.
|
|
861
|
+
|
|
862
|
+
|
|
863
|
+
## When node refuses your TypeScript
|
|
864
|
+
|
|
865
|
+
The bins' shebang is node, and node's type stripping **erases** types — it does
|
|
866
|
+
not transform. Three ordinary things it refuses, all of which vite and bun
|
|
867
|
+
compile without comment:
|
|
868
|
+
|
|
869
|
+
| what you wrote | what node says |
|
|
870
|
+
|---|---|
|
|
871
|
+
| `import scene from './game.scene.json'` | needs an import attribute of "type: json" |
|
|
872
|
+
| `import { quest } from './quest'` | Cannot find module …/quest |
|
|
873
|
+
| `constructor(private root: Node3D)` | TypeScript parameter property is not supported in strip-only mode |
|
|
874
|
+
|
|
875
|
+
**You do not have to change any of them.** Every bin that loads a `--behaviors`
|
|
876
|
+
file re-runs itself under bun when node refuses it, so the command just works.
|
|
877
|
+
If bun is not on PATH the message says which of the three it hit.
|
|
878
|
+
|
|
879
|
+
Prefix with `bunx --bun` to skip the round trip.
|
|
@@ -83,13 +83,13 @@ and it is entirely JSON.
|
|
|
83
83
|
```jsonc
|
|
84
84
|
"connections": [
|
|
85
85
|
{ "signal": "died", "from": "Player", "to": "Score", "handler": "loseLife" },
|
|
86
|
-
{ "signal": "lifeLost", "from": "Score", "to": "Player", "handler": "
|
|
86
|
+
{ "signal": "lifeLost", "from": "Score", "to": "Player", "handler": "reviveFull" },
|
|
87
87
|
{ "signal": "won", "from": "Score", "to": "Flow", "handler": "win" },
|
|
88
88
|
{ "signal": "lost", "from": "Score", "to": "Flow", "handler": "gameOver" }
|
|
89
89
|
]
|
|
90
90
|
```
|
|
91
91
|
|
|
92
|
-
**`lifeLost →
|
|
92
|
+
**`lifeLost → reviveFull` is not optional.** A `Health` that has died stays dead:
|
|
93
93
|
`damage`, `heal` and regen all stop, so without that wire the player becomes a
|
|
94
94
|
walking corpse after the first death — full HP bar, immune to everything,
|
|
95
95
|
`died` never firing again, lives frozen, and the game quietly unlosable. It
|
|
@@ -158,7 +158,7 @@ floats over small ledges already.
|
|
|
158
158
|
The tell for both is one line of `incanto-playtest` output:
|
|
159
159
|
|
|
160
160
|
```
|
|
161
|
-
danger:
|
|
161
|
+
danger: nothing in this scene can hurt the player — no DamageOnContact, no hazard group
|
|
162
162
|
```
|
|
163
163
|
|
|
164
164
|
Read it. It is the truth.
|
|
@@ -219,7 +219,7 @@ Things that cost real time, in the order you will meet them.
|
|
|
219
219
|
|
|
220
220
|
| when | the trap |
|
|
221
221
|
| --- | --- |
|
|
222
|
-
| a game with LIVES | `died` stops a `Health` for good — wire `lifeLost →
|
|
222
|
+
| a game with LIVES | `died` stops a `Health` for good — wire `lifeLost → reviveFull` or you can spend only one. **Not `revive`**: `lifeLost` carries the life COUNT and `revive(hp?)` reads it as health, so you come back at 2 HP, then 1, then 0. |
|
|
223
223
|
| wiring a score | `died` carries nothing; `addScore(n)` wants one → `NaN`. Wire `dealtDamage` from the killer. |
|
|
224
224
|
| enemies feel harmless | `repeatEvery` on the contact hitbox, or one hit is all you get. |
|
|
225
225
|
| enemies never arrive | a chaser cannot climb — `stepHeight`, and it loses to a large downward velocity you apply yourself. |
|
|
@@ -122,7 +122,8 @@
|
|
|
122
122
|
"props": {
|
|
123
123
|
"pausePanelPath": "%PauseMenu"
|
|
124
124
|
}
|
|
125
|
-
}
|
|
125
|
+
},
|
|
126
|
+
"uid": "n_59r4gykhbcuemdgu"
|
|
126
127
|
},
|
|
127
128
|
{
|
|
128
129
|
"name": "Terrain",
|
|
@@ -1605,7 +1606,8 @@
|
|
|
1605
1606
|
"volume": 0.5
|
|
1606
1607
|
}
|
|
1607
1608
|
}
|
|
1608
|
-
]
|
|
1609
|
+
],
|
|
1610
|
+
"uid": "n_z47j96sgcxut952d"
|
|
1609
1611
|
},
|
|
1610
1612
|
{
|
|
1611
1613
|
"name": "Ward1",
|
|
@@ -1973,7 +1975,8 @@
|
|
|
1973
1975
|
"oncePerTarget": false,
|
|
1974
1976
|
"repeatEvery": 1.2
|
|
1975
1977
|
}
|
|
1976
|
-
}
|
|
1978
|
+
},
|
|
1979
|
+
"uid": "n_z8vhukdcirpi88je"
|
|
1977
1980
|
},
|
|
1978
1981
|
{
|
|
1979
1982
|
"name": "HissSfx",
|
|
@@ -1987,7 +1990,8 @@
|
|
|
1987
1990
|
"maxDistance": 30
|
|
1988
1991
|
}
|
|
1989
1992
|
}
|
|
1990
|
-
]
|
|
1993
|
+
],
|
|
1994
|
+
"uid": "n_n468rqi1ozzm61uu"
|
|
1991
1995
|
},
|
|
1992
1996
|
{
|
|
1993
1997
|
"name": "Shade1_2",
|
|
@@ -2091,7 +2095,8 @@
|
|
|
2091
2095
|
"oncePerTarget": false,
|
|
2092
2096
|
"repeatEvery": 1.2
|
|
2093
2097
|
}
|
|
2094
|
-
}
|
|
2098
|
+
},
|
|
2099
|
+
"uid": "n_bq1hz55sxw1i1im1"
|
|
2095
2100
|
},
|
|
2096
2101
|
{
|
|
2097
2102
|
"name": "HissSfx",
|
|
@@ -2105,7 +2110,8 @@
|
|
|
2105
2110
|
"maxDistance": 30
|
|
2106
2111
|
}
|
|
2107
2112
|
}
|
|
2108
|
-
]
|
|
2113
|
+
],
|
|
2114
|
+
"uid": "n_ny13372zziqzgpom"
|
|
2109
2115
|
},
|
|
2110
2116
|
{
|
|
2111
2117
|
"name": "Shade2_1",
|
|
@@ -2209,7 +2215,8 @@
|
|
|
2209
2215
|
"oncePerTarget": false,
|
|
2210
2216
|
"repeatEvery": 1.2
|
|
2211
2217
|
}
|
|
2212
|
-
}
|
|
2218
|
+
},
|
|
2219
|
+
"uid": "n_y9jsyb615rpdggas"
|
|
2213
2220
|
},
|
|
2214
2221
|
{
|
|
2215
2222
|
"name": "HissSfx",
|
|
@@ -2223,7 +2230,8 @@
|
|
|
2223
2230
|
"maxDistance": 30
|
|
2224
2231
|
}
|
|
2225
2232
|
}
|
|
2226
|
-
]
|
|
2233
|
+
],
|
|
2234
|
+
"uid": "n_r53mg0r2ctvvkvjj"
|
|
2227
2235
|
},
|
|
2228
2236
|
{
|
|
2229
2237
|
"name": "Shade2_2",
|
|
@@ -2327,7 +2335,8 @@
|
|
|
2327
2335
|
"oncePerTarget": false,
|
|
2328
2336
|
"repeatEvery": 1.2
|
|
2329
2337
|
}
|
|
2330
|
-
}
|
|
2338
|
+
},
|
|
2339
|
+
"uid": "n_fg4pcm0kcpbzpqui"
|
|
2331
2340
|
},
|
|
2332
2341
|
{
|
|
2333
2342
|
"name": "HissSfx",
|
|
@@ -2341,7 +2350,8 @@
|
|
|
2341
2350
|
"maxDistance": 30
|
|
2342
2351
|
}
|
|
2343
2352
|
}
|
|
2344
|
-
]
|
|
2353
|
+
],
|
|
2354
|
+
"uid": "n_y5kshgw9213y7eeo"
|
|
2345
2355
|
},
|
|
2346
2356
|
{
|
|
2347
2357
|
"name": "Shade3_1",
|
|
@@ -2445,7 +2455,8 @@
|
|
|
2445
2455
|
"oncePerTarget": false,
|
|
2446
2456
|
"repeatEvery": 1.2
|
|
2447
2457
|
}
|
|
2448
|
-
}
|
|
2458
|
+
},
|
|
2459
|
+
"uid": "n_l9e6uonnlyg7m16w"
|
|
2449
2460
|
},
|
|
2450
2461
|
{
|
|
2451
2462
|
"name": "HissSfx",
|
|
@@ -2459,7 +2470,8 @@
|
|
|
2459
2470
|
"maxDistance": 30
|
|
2460
2471
|
}
|
|
2461
2472
|
}
|
|
2462
|
-
]
|
|
2473
|
+
],
|
|
2474
|
+
"uid": "n_ojzy1ypkshyepyvy"
|
|
2463
2475
|
},
|
|
2464
2476
|
{
|
|
2465
2477
|
"name": "Shade3_2",
|
|
@@ -2563,7 +2575,8 @@
|
|
|
2563
2575
|
"oncePerTarget": false,
|
|
2564
2576
|
"repeatEvery": 1.2
|
|
2565
2577
|
}
|
|
2566
|
-
}
|
|
2578
|
+
},
|
|
2579
|
+
"uid": "n_7xn82zimw6skfh3j"
|
|
2567
2580
|
},
|
|
2568
2581
|
{
|
|
2569
2582
|
"name": "HissSfx",
|
|
@@ -2577,7 +2590,8 @@
|
|
|
2577
2590
|
"maxDistance": 30
|
|
2578
2591
|
}
|
|
2579
2592
|
}
|
|
2580
|
-
]
|
|
2593
|
+
],
|
|
2594
|
+
"uid": "n_l5g65a25w1r2yvby"
|
|
2581
2595
|
},
|
|
2582
2596
|
{
|
|
2583
2597
|
"name": "Player",
|
|
@@ -2622,7 +2636,8 @@
|
|
|
2622
2636
|
},
|
|
2623
2637
|
"script": {
|
|
2624
2638
|
"name": "SwordStrike"
|
|
2625
|
-
}
|
|
2639
|
+
},
|
|
2640
|
+
"uid": "n_cyhj8t0qy5t3k94v"
|
|
2626
2641
|
},
|
|
2627
2642
|
{
|
|
2628
2643
|
"name": "Skin",
|
|
@@ -2727,7 +2742,8 @@
|
|
|
2727
2742
|
"nightDarkness": 0.32,
|
|
2728
2743
|
"maxSunElevationDeg": 48
|
|
2729
2744
|
}
|
|
2730
|
-
}
|
|
2745
|
+
},
|
|
2746
|
+
"uid": "n_v447j9q4dnw2gwtj"
|
|
2731
2747
|
},
|
|
2732
2748
|
{
|
|
2733
2749
|
"name": "Boss",
|
|
@@ -2878,7 +2894,8 @@
|
|
|
2878
2894
|
"oncePerTarget": false,
|
|
2879
2895
|
"repeatEvery": 1.5
|
|
2880
2896
|
}
|
|
2881
|
-
}
|
|
2897
|
+
},
|
|
2898
|
+
"uid": "n_sfo65nky8me2m1lr"
|
|
2882
2899
|
},
|
|
2883
2900
|
{
|
|
2884
2901
|
"name": "RoarSfx",
|
|
@@ -2892,7 +2909,8 @@
|
|
|
2892
2909
|
"maxDistance": 90
|
|
2893
2910
|
}
|
|
2894
2911
|
}
|
|
2895
|
-
]
|
|
2912
|
+
],
|
|
2913
|
+
"uid": "n_er3epyju7e5xopzg"
|
|
2896
2914
|
},
|
|
2897
2915
|
{
|
|
2898
2916
|
"name": "Camera",
|
|
@@ -2997,7 +3015,8 @@
|
|
|
2997
3015
|
}
|
|
2998
3016
|
]
|
|
2999
3017
|
}
|
|
3000
|
-
]
|
|
3018
|
+
],
|
|
3019
|
+
"uid": "n_ndhsdrkhi26aksvr"
|
|
3001
3020
|
},
|
|
3002
3021
|
"connections": [
|
|
3003
3022
|
{
|