@jgengine/convex 0.40.0 → 0.42.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 +61 -0
- package/package.json +2 -2
- package/skills/jgengine/api.md +3 -3
- package/skills/jgengine/capabilities.md +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -26,6 +26,67 @@ At publish, rename this heading to the new version and mirror the entries into
|
|
|
26
26
|
`packages/core/src/meta/changelog.ts` (the typed `CHANGELOG` export).
|
|
27
27
|
-->
|
|
28
28
|
|
|
29
|
+
## 0.42.0
|
|
30
|
+
|
|
31
|
+
### Migrate
|
|
32
|
+
|
|
33
|
+
- **Bump lockstep SDK packages to `^0.42.0`:** `@jgengine/{core,rapier,react,ws,node,sql,convex,shell,editor,assets,navbake}`. CLI `jgengine` is `0.39.0`; `@jgengine/github` is `0.29.0`.
|
|
34
|
+
|
|
35
|
+
### Added
|
|
36
|
+
|
|
37
|
+
- `createSideJobs` (`@jgengine/core/mission/sideJobs`) runs repeatable side jobs (taxi fares, deliveries, tows, street races) as data-declared kinds: seeded offers from game spots or authored routes, pickup → drops → paid/failed against a `slack + distance / speed` clock, fare `base + perMetre × distance` plus time bonus, a comfort-scaled tip from the game's `comfortLoss` rule, a back-to-back streak bonus, cooldowns, a `wager` purse by place, and `race` kinds run on `RaceState` against rival positions the game reports. `snapshot`/`restore`, `retune` and optional `persist`. Pure helpers `sideJobFare`, `sideJobDeadline`, `sideJobTip`, `sideJobStreakBonus`.
|
|
38
|
+
- `OnDeathSpec.keep`: an entity whose game owns its death (a downed window, a revive in place) stays in the scene on a lethal hit; `entity.died` fires with `kept: true`, drops and commands still run. `deathRemovesEntity(event)` tells presentation whether the body left, and ragdolls, the dead flag and the death clip skip a kept death.
|
|
39
|
+
- `planInteriorDressing` and `interiorWallRuns` (`@jgengine/core/world/interiorDressing`) plan an interior's trims, pipe runs with brackets and valves, sagging cables, stains, wall lamps and wall clutter slots from its room footprints, deterministic per seed, with kept-clear spots and a walkway left open. `nearestFixtures` picks the lamps nearest an eye for a light pool.
|
|
40
|
+
- `InteriorDressing` and `PracticalLights` (`@jgengine/shell/render/InteriorDressing`) draw a plan in a handful of instanced draws (static shape batches, one merged cable mesh, one instanced decal mesh per stain style) and light the nearest lamps from a fixed, shadow-capped spot-light pool.
|
|
41
|
+
- Decal styles `grime`, `leak`, `rust` and `wet`.
|
|
42
|
+
- `postProcessing.atmosphere.indoor` keeps the haze running with no shadow-casting sun, and `atmosphere.lamps` makes the nearest point and spot lights (up to eight) glow in it. A light with `userData.haze === false` never glows.
|
|
43
|
+
|
|
44
|
+
### Fixed
|
|
45
|
+
|
|
46
|
+
- A hit is lethal only when it empties the target's last pool, not when it lands on a pool already at its floor.
|
|
47
|
+
|
|
48
|
+
## 0.41.0
|
|
49
|
+
|
|
50
|
+
### Migrate
|
|
51
|
+
|
|
52
|
+
- **Bump lockstep SDK packages to `^0.41.0`:** `@jgengine/{core,rapier,react,ws,node,sql,convex,shell,editor,assets,navbake}`. CLI `jgengine` is `0.38.0`; `@jgengine/github` is `0.28.0`.
|
|
53
|
+
|
|
54
|
+
### Added
|
|
55
|
+
|
|
56
|
+
- `upgradePathActions`, `upgradePathFacts`, `upgradeOptions` and `upgradeProgress` (`@jgengine/core/worldModel/upgradePaths`) compile a placed kind's upgrade ladder - a shared trunk, then exclusive branches - into world actions, and list the next steps an instance can take with the world's price and refusal.
|
|
57
|
+
- `createWaveCountdown` (`@jgengine/core/ai/director/waveCountdown`) runs the intermission between waves: the next wave goes out when it runs down, and `callEarly()` prices the seconds skipped.
|
|
58
|
+
- `summarizeWave` (`@jgengine/core/ai/director/wavePreview`) totals an authored wave's units by first arrival, with trait counts and the entries it uses, for a preview card or a balance test.
|
|
59
|
+
- `AutoTargetDeps.eligible` keeps a picker off candidates it cannot hit; `nextAutoTargetPolicy` and `AUTO_TARGET_POLICIES` step a player-chosen targeting priority.
|
|
60
|
+
- Creatures with temperaments: `decideTemperament` (`@jgengine/core/ai/temperament`) turns a creature's perception memory into flee, investigate, stalk, attack, guard or return. Passive creatures keep their distance, territorial ones defend the ground around their den and go home after, predators charge what they saw and follow a smell or a noise to where it came from. Light draws or drives off a creature, and a badly hurt one breaks off.
|
|
61
|
+
- Perception senses scent and light: a `"scent"` stimulus (blood, bait) reaches as far as `scentRange` times its strength, a candidate's `visibility` stretches or shrinks how far it is seen (a lamp on, crouched in the dark), and every memory records the `cue` that produced it.
|
|
62
|
+
- Codex fragments: an entry with `fragments: n` is learned after `n` calls to `codex.scan(id)`, the view shows `scanned` of `fragments`, and partial scans survive save and load. Old saves still load.
|
|
63
|
+
- `createMedalBoard` (`@jgengine/core/progression/medalBoard`): per-event bronze/silver/gold targets over a stored best (lower- or higher-is-better), tiers of events that open on medal points, and a `submit` that names medals earned for the first time so a game pays one-time rewards. Snapshot/restore as plain JSON.
|
|
64
|
+
- Drive key steps take `until`: `{ "key": "KeyW", "until": { "is": "__jgProbe().z < -3.5" } }` holds the key until the page expression holds, then releases (`ms` is a minimum, `timeoutMs` caps the hold and fails the step). Engine `drive`, lockstep `--record` and the portable `drive.mjs` all honor it, so a walk to a place no longer depends on how fast the page renders.
|
|
65
|
+
- `createStoryteller` (`@jgengine/core/ai/director/storyteller`) paces incidents by threat points: points build with play time (scaled by what the game reads as wealth), each gap draws an incident the points can afford, with cooldowns, conditions, repeat damping and extra quiet after a big threat. State, snapshot, restore and retune are plain values.
|
|
66
|
+
- `createBuildPlanner` (`@jgengine/core/ai/buildOrder`) plans an RTS opponent's economy: an ordered build order, tech paths inserted for unmet requirements (`resolveTechPath`, `missingRequirements`), supply providers made ahead of a block, a worker target and an army composition. A `DifficultyProfile` sets how often it decides, how often it picks a worse unit, and whether it saves or floats money. `snapshot`/`restore`/`retune`.
|
|
67
|
+
- `createAttackClock` (same module) launches growing attack waves once the army is big enough, or after `maxWait` with whatever army exists.
|
|
68
|
+
- `pointer.select` modifiers: Shift+click toggles an entity, Shift+drag adds the box to the selection, and double-click or Ctrl+click selects every on-screen entity of the same `pointer.selectKind(id)`.
|
|
69
|
+
- `pointer.controlGroups` (`true` or `ControlGroupOptions`): Ctrl/Cmd+digit binds the selection, Shift+digit appends, a digit recalls (dropping dead or filtered ids), a second tap centres the camera. While on, digit keys no longer reach `game.input` action bindings.
|
|
70
|
+
- `ctx.scene.entity.controlGroups`, the `SelectionBookmarks` store those keys write; a despawned entity drops out of every group.
|
|
71
|
+
- `ctx.camera.panTo({ x, z })` queues a one-shot jump of the `rts` rig's pan center (clamped to `rts.bounds`) for minimap clicks and group focus.
|
|
72
|
+
- `resolveControlGroupIntent` takes `appendModifier` and returns an `append` intent.
|
|
73
|
+
|
|
74
|
+
### Changed
|
|
75
|
+
|
|
76
|
+
- The `rts` camera rig stops rotating on Q/E when the game's input map binds either key, the same way it already gives up WASD panning, so a grid command card (QWER / ASDF / ZXCV) can use them. Arrows, edge-scroll and the wheel still move the camera.
|
|
77
|
+
- The touch dock's right-thumb cluster is shooter-shaped: one big main button (the `fire`/`shoot`/`attack` action, or a `touch.buttons` spec marked `main: true`) in the corner with secondaries on tight arcs around it, sized from the screen's short side. The old wrapping grid of large buttons is gone.
|
|
78
|
+
- Every touch button shows an icon or a 1–3 character glyph, never its label text: shooter verbs (fire, aim, reload, grenade, heal, skills, ability) get glyphs, unknown actions get initials, and `TouchButtonSpec.icon` takes a `GameIconName`, a touch glyph or a short text glyph. The label stays as the accessible name.
|
|
79
|
+
- `selectSlotN` (and `equipSlotN`, `weaponSlotN`) actions collapse into one row of small numbered chips (`TouchScheme.slots`) instead of a big button each.
|
|
80
|
+
- Menu-type touch actions (`openSkills`, `toggleMap`, …) render as small icon chips beside the slot row, folded into a `⋯` overflow chip past two; `layout.utility` now defaults to `bottom-right`.
|
|
81
|
+
- The dock reserves only the bottom corners it occupies: the shell publishes `--jg-hud-dock-clearance-left|center|right` and `HudCanvas` lifts each bottom region by its own value, so bottom-centre HUD is no longer pushed up.
|
|
82
|
+
- The default `glass` touch skin reads the game's HudTheme tokens (`--jg-surface-deep`, `--jg-text`, `--jg-accent`).
|
|
83
|
+
|
|
84
|
+
### Fixed
|
|
85
|
+
|
|
86
|
+
- Saving the scene (`save_scene`, Ctrl+S) or tuned values while the dev runner serves a game with `--game-dir` now writes into that checkout. It used to write into `Games/<id>`, editing a different checkout than the one on screen.
|
|
87
|
+
- Pointer clicks on worlds with terrain land on the ground under the cursor instead of the sky dome or the y=0 plane under the hills. `PointerProbe` takes an optional `groundHeightAt`, which `Shell3dPresentation` passes for bounded terrains; flat arenas are unchanged.
|
|
88
|
+
- `gameFrameVars()` installs the frame stylesheet itself. An element dressed by hand used to show up bare when no `GameFrame` had mounted yet, for example a HUD in a game that starts straight in play with no menu before it.
|
|
89
|
+
|
|
29
90
|
## 0.40.0
|
|
30
91
|
|
|
31
92
|
### Migrate
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jgengine/convex",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.42.0",
|
|
4
4
|
"description": "Convex adapters for JGengine: game transport, presence transport, and backend wiring over @jgengine/core.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"check-types": "tsgo --noEmit -p tsconfig.json"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@jgengine/core": "^0.
|
|
33
|
+
"@jgengine/core": "^0.42.0"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"convex": "^1.31.2",
|
package/skills/jgengine/api.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
- `CHANGELOG` (const): const CHANGELOG: Record<string, ChangelogEntry> — Per-version engine changelog keyed by semver string (e.g. `"0.10.0"`).
|
|
8
8
|
- `ChangelogEntry` (interface): interface ChangelogEntry — One release's migrate steps plus added/changed/removed notes (typed mirror of CHANGELOG.md).
|
|
9
|
-
- `VERSION` (const): const VERSION: "0.
|
|
9
|
+
- `VERSION` (const): const VERSION: "0.42.0" — Installed `@jgengine/core` semver - compare against {@link CHANGELOG} keys when migrating.
|
|
10
10
|
|
|
11
11
|
## @jgengine/core/authoring
|
|
12
12
|
|
|
@@ -285,7 +285,7 @@
|
|
|
285
285
|
|
|
286
286
|
- `CHANGELOG` (const): const CHANGELOG: Record<string, ChangelogEntry> — Per-version engine changelog keyed by semver string (e.g. `"0.10.0"`).
|
|
287
287
|
- `ChangelogEntry` (interface): interface ChangelogEntry — One release's migrate steps plus added/changed/removed notes (typed mirror of CHANGELOG.md).
|
|
288
|
-
- `VERSION` (const): const VERSION: "0.
|
|
288
|
+
- `VERSION` (const): const VERSION: "0.42.0" — Installed `@jgengine/core` semver - compare against {@link CHANGELOG} keys when migrating.
|
|
289
289
|
|
|
290
290
|
## @jgengine/core/runtime/adapter
|
|
291
291
|
|
|
@@ -313,7 +313,7 @@
|
|
|
313
313
|
## @jgengine/core/runtime/cameraDirector
|
|
314
314
|
|
|
315
315
|
- `CHASE_VIEWS` (const): const CHASE_VIEWS: readonly ChaseView[] — Default order {@link nextChaseView} cycles through.
|
|
316
|
-
- `CameraDirector` (interface): interface CameraDirector
|
|
316
|
+
- `CameraDirector` (interface): interface CameraDirector — Runtime camera policy at `ctx.camera`: follow target, rig overlay, cinematic, chase tuning, FOV kicks and RTS pan jumps.
|
|
317
317
|
- `CameraDirectorSnapshot` (type): type CameraDirectorSnapshot = CameraSerialized<CameraDirectorState> — JSON-safe camera policy; documented instant chase responses use an explicit Infinity marker.
|
|
318
318
|
- `CameraDirectorState` (interface): interface CameraDirectorState — Camera policy state before the JSON-safe snapshot number encoding.
|
|
319
319
|
- `CameraRigConfig` (type): type CameraRigConfig = Omit<GameCameraConfig, "rig" | "projection" | "pixelPerfect" | "frustum" | "playerFov" | "weapon" | "onCameraFollow"> — Data overlay for an existing rig; callbacks and Canvas projection/preferences remain configured by the game.
|
|
@@ -12,6 +12,10 @@ Reach for these before hand-rolling. Each row is *the thing you need* → *the p
|
|
|
12
12
|
|
|
13
13
|
- `collectAuthoredTriggers` (function) · `import { collectAuthoredTriggers } from "@jgengine/shell/gameKit"`
|
|
14
14
|
|
|
15
|
+
## camera-director — drive the camera at runtime (follow, rig swap, cinematic, chase tuning, FOV kick, RTS pan-to jump)
|
|
16
|
+
|
|
17
|
+
- `CameraDirector` (interface) · `import { CameraDirector } from "@jgengine/core/runtime/cameraDirector"`
|
|
18
|
+
|
|
15
19
|
## chase-view-cycle — cycle a vehicle camera between chase, hood and cockpit views at runtime
|
|
16
20
|
|
|
17
21
|
- `nextChaseView` (function) · `import { nextChaseView } from "@jgengine/core/runtime/cameraDirector"`
|