incanto 0.49.0 → 0.50.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/incanto-play.mjs +42 -17
- package/dist/2d.js +2 -2
- package/dist/3d.js +4 -4
- package/dist/{create-game-BgV6UbVA.js → create-game-BLDjy_PW.js} +2 -2
- package/dist/{create-game-DFBjMetZ.js → create-game-DqqxEax1.js} +3 -3
- package/dist/{environment-presets-CZOH5TY5.js → environment-presets-XFuqu5jv.js} +1 -1
- package/dist/{gameplay-02Btmmjn.js → gameplay-DbaI313d.js} +16 -2
- package/dist/gameplay.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/{physics-2d-vyCBfACH.js → physics-2d-_9VBOHn6.js} +1 -1
- package/dist/{physics-3d-DpRqw8Mz.js → physics-3d-DrpF5hcG.js} +7 -7
- package/dist/react.js +1 -1
- package/dist/{replay-CAphXMyM.d.ts → replay-DYdy1wb0.d.ts} +5 -1
- package/dist/{replay-C0XJIsO7.js → replay-j-m6lJ4W.js} +22 -2
- package/dist/{src-DF4gCsqO.js → src-B3HrKuAi.js} +1 -1
- package/dist/{test-DRna_BQU.js → test-D16igj4C.js} +44 -17
- package/dist/test.d.ts +1 -1
- package/dist/test.js +2 -2
- package/dist/vite.js +2 -2
- package/editor/assets/{agent8-DCW4TgDt.js → agent8-t3kl5q9K.js} +1 -1
- package/editor/assets/{debug-RC6qts6S.js → debug-Bu3eeAlO.js} +1 -1
- package/editor/assets/{index-5dEIhvsf.js → index-Df5g8ofT.js} +51 -51
- package/editor/index.html +1 -1
- package/package.json +1 -1
- package/skills/incanto-gameplay-behaviors.md +11 -0
- package/skills/incanto-playtesting.md +13 -2
- package/templates-app/beacon-isle-3d/package.json +1 -1
- package/templates-app/tps-3d/package.json +1 -1
- package/templates-app/village-quest-3d/package.json +1 -1
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-Df5g8ofT.js"></script>
|
|
9
9
|
<link rel="modulepreload" crossorigin href="./assets/GameServer-C56iOUgF.js">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
package/package.json
CHANGED
|
@@ -356,6 +356,17 @@ whole entity toward the target. (Distance is measured from the moved parent.)
|
|
|
356
356
|
"script": { "name": "Chase", "props": { "target": "/root/Player", "speed": 120, "stopRange": 20 } } }
|
|
357
357
|
```
|
|
358
358
|
|
|
359
|
+
**A character body chases through the level, not through walls.** When the node
|
|
360
|
+
being moved is a `CharacterBody2D`/`3D`, `Chase` (and `Patrol`) move it with
|
|
361
|
+
`moveAndSlide()`, so it collides and slides like any character. A plain
|
|
362
|
+
`Node2D`/`Node3D` — the example above — has no collider and keeps the direct
|
|
363
|
+
write, which is also what you want for a ghost or a flying marker.
|
|
364
|
+
|
|
365
|
+
This is straight-line homing, not pathfinding: a body can now be STOPPED by
|
|
366
|
+
geometry it used to walk through. When enemies must find their way around a
|
|
367
|
+
level, that is what `buildTerrainNav` + `findPath` + `PathFollow` are for (see
|
|
368
|
+
`incanto-building-3d-games.md`).
|
|
369
|
+
|
|
359
370
|
## Wander
|
|
360
371
|
|
|
361
372
|
Seeded random roaming inside a circle around the spawn point — idle critters,
|
|
@@ -98,12 +98,23 @@ far more useful.
|
|
|
98
98
|
## Replays
|
|
99
99
|
|
|
100
100
|
A run that did not win is written out. Because the engine is deterministic
|
|
101
|
-
(seeded RNG, injected clock), a replay reproduces that run **bit-identically
|
|
101
|
+
(seeded RNG, injected clock), a replay reproduces that run **bit-identically** —
|
|
102
|
+
feed the file straight back in, with the seed the run used:
|
|
102
103
|
|
|
103
104
|
```bash
|
|
104
|
-
bunx incanto-play src/game.scene.json --seed
|
|
105
|
+
bunx incanto-play src/game.scene.json --seed 1 --commands .incanto/playtest/fell-seed1.json
|
|
106
|
+
# {"ok":true,"cmd":"replay","frames":804,"events":963}
|
|
107
|
+
# … then the scene as it ended: /Game/Player position=[28.9, -49.46, …]
|
|
105
108
|
```
|
|
106
109
|
|
|
110
|
+
`--commands` takes either a text command script or a replay file and tells them
|
|
111
|
+
apart by content. The seed matters: the world's own randomness (spawners,
|
|
112
|
+
wandering AI) comes from it, and only the PLAYER's input is in the recording.
|
|
113
|
+
|
|
114
|
+
Then read where it ended. The player above left a walled 40×40 arena at
|
|
115
|
+
`x = 28.9` before falling — a thing you cannot learn from "fell in 1/4" and can
|
|
116
|
+
read straight off the replay.
|
|
117
|
+
|
|
107
118
|
One file per *kind* of failure — twenty identical "stuck" replays teach nothing
|
|
108
119
|
the first one does not.
|
|
109
120
|
|