@jgengine/core 0.14.0 → 0.15.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.
Files changed (214) hide show
  1. package/CHANGELOG.md +500 -1
  2. package/dist/ai/difficulty.d.ts +154 -0
  3. package/dist/ai/difficulty.js +194 -0
  4. package/dist/ai/driver.d.ts +107 -0
  5. package/dist/ai/driver.js +175 -0
  6. package/dist/ai/flock.js +13 -23
  7. package/dist/ai/laneSelect.js +2 -1
  8. package/dist/ai/mobBrain.js +2 -1
  9. package/dist/ai/waveRunner.d.ts +81 -0
  10. package/dist/ai/waveRunner.js +104 -0
  11. package/dist/audio/musicState.d.ts +47 -0
  12. package/dist/audio/musicState.js +38 -0
  13. package/dist/audio/stepCadence.d.ts +47 -0
  14. package/dist/audio/stepCadence.js +29 -0
  15. package/dist/audio/synth.d.ts +12 -0
  16. package/dist/authoring.d.ts +6 -4
  17. package/dist/authoring.js +6 -4
  18. package/dist/combat/castRunner.d.ts +13 -1
  19. package/dist/combat/castRunner.js +5 -1
  20. package/dist/combat/comboMeter.d.ts +140 -0
  21. package/dist/combat/comboMeter.js +215 -0
  22. package/dist/combat/comboPoints.d.ts +11 -0
  23. package/dist/combat/comboPoints.js +11 -2
  24. package/dist/combat/damageResolution.d.ts +1 -1
  25. package/dist/combat/defensiveWindow.d.ts +5 -0
  26. package/dist/combat/effects.d.ts +24 -0
  27. package/dist/combat/effects.js +6 -1
  28. package/dist/combat/projectiles.d.ts +6 -0
  29. package/dist/combat/projectiles.js +2 -2
  30. package/dist/combat/regenShield.d.ts +40 -2
  31. package/dist/combat/regenShield.js +66 -18
  32. package/dist/combat/resourcePool.d.ts +19 -0
  33. package/dist/combat/resourcePool.js +20 -2
  34. package/dist/combat/shotOrigin.d.ts +5 -0
  35. package/dist/combat/statusApplication.d.ts +1 -1
  36. package/dist/combat/statusApplication.js +2 -1
  37. package/dist/combat/statusEffectView.d.ts +56 -0
  38. package/dist/combat/statusEffectView.js +52 -0
  39. package/dist/combat.d.ts +4 -2
  40. package/dist/combat.js +2 -0
  41. package/dist/devtools/fallbackSeams.d.ts +3 -2
  42. package/dist/devtools/fallbackSeams.js +1 -1
  43. package/dist/devtools/textureErrors.d.ts +40 -0
  44. package/dist/devtools/textureErrors.js +68 -0
  45. package/dist/economy/shopStock.d.ts +110 -0
  46. package/dist/economy/shopStock.js +157 -0
  47. package/dist/economy/wallet.d.ts +6 -0
  48. package/dist/economy/wallet.js +1 -0
  49. package/dist/game/achievements.d.ts +80 -0
  50. package/dist/game/achievements.js +124 -0
  51. package/dist/game/cameraConfig.d.ts +7 -0
  52. package/dist/game/codex.d.ts +60 -0
  53. package/dist/game/codex.js +89 -0
  54. package/dist/game/credits.d.ts +36 -0
  55. package/dist/game/credits.js +0 -0
  56. package/dist/game/defineGame.d.ts +28 -3
  57. package/dist/game/defineGame.js +5 -0
  58. package/dist/game/dialogueGraph.d.ts +116 -0
  59. package/dist/game/dialogueGraph.js +103 -0
  60. package/dist/game/eventTicker.d.ts +95 -0
  61. package/dist/game/eventTicker.js +91 -0
  62. package/dist/game/events.d.ts +24 -5
  63. package/dist/game/events.js +18 -0
  64. package/dist/game/gamePhase.d.ts +1 -1
  65. package/dist/game/gamePhase.js +1 -1
  66. package/dist/game/leaderboardRank.d.ts +71 -0
  67. package/dist/game/leaderboardRank.js +76 -0
  68. package/dist/game/lootTable.d.ts +10 -1
  69. package/dist/game/lootTable.js +4 -2
  70. package/dist/game/notifications.d.ts +57 -0
  71. package/dist/game/notifications.js +107 -0
  72. package/dist/game/playableGame.d.ts +39 -2
  73. package/dist/game/quest.d.ts +26 -0
  74. package/dist/game/quest.js +31 -0
  75. package/dist/game/runDraft.js +2 -1
  76. package/dist/game/saveSlots.d.ts +102 -0
  77. package/dist/game/saveSlots.js +136 -0
  78. package/dist/game/talentTreeView.d.ts +106 -0
  79. package/dist/game/talentTreeView.js +114 -0
  80. package/dist/game/worldItem.js +2 -1
  81. package/dist/gameplay.d.ts +15 -4
  82. package/dist/gameplay.js +13 -2
  83. package/dist/i18n/i18n.d.ts +51 -0
  84. package/dist/i18n/i18n.js +82 -0
  85. package/dist/input/axisInput.d.ts +1 -1
  86. package/dist/input/axisInput.js +18 -2
  87. package/dist/input/rebindSession.d.ts +141 -0
  88. package/dist/input/rebindSession.js +235 -0
  89. package/dist/input/touchControlsMode.d.ts +16 -0
  90. package/dist/input/touchControlsMode.js +23 -0
  91. package/dist/input/touchScheme.d.ts +30 -1
  92. package/dist/input/touchScheme.js +31 -1
  93. package/dist/interaction/promptRegistry.d.ts +78 -0
  94. package/dist/interaction/promptRegistry.js +130 -0
  95. package/dist/inventory/storageTier.js +3 -2
  96. package/dist/meta/changelog.d.ts +1 -1
  97. package/dist/meta/changelog.js +145 -1
  98. package/dist/movement/movementModel.d.ts +26 -3
  99. package/dist/movement/movementModel.js +121 -15
  100. package/dist/movement/playerMovement.js +161 -25
  101. package/dist/physics/drivableVehicle.js +3 -1
  102. package/dist/physics/kinematicVehicle.d.ts +56 -1
  103. package/dist/physics/kinematicVehicle.js +99 -10
  104. package/dist/physics/vehicleObstacles.js +19 -0
  105. package/dist/random/resolveRng.d.ts +14 -0
  106. package/dist/random/resolveRng.js +31 -0
  107. package/dist/render/postProcessing.d.ts +12 -1
  108. package/dist/runtime/cameraDirector.d.ts +2 -2
  109. package/dist/runtime/context/combat.js +8 -0
  110. package/dist/runtime/gameContext.js +6 -1
  111. package/dist/runtime/gameContextTypes.d.ts +18 -0
  112. package/dist/runtime/inputSnapshot.d.ts +10 -1
  113. package/dist/runtime/inputSnapshot.js +13 -1
  114. package/dist/runtime/runtimeSave.d.ts +3 -3
  115. package/dist/runtime/runtimeSave.js +11 -2
  116. package/dist/scene/assetDiagnostics.js +2 -2
  117. package/dist/scene/autoTarget.js +2 -1
  118. package/dist/scene/captureCheck.js +3 -2
  119. package/dist/scene/entityStore.d.ts +4 -1
  120. package/dist/scene/entityStore.js +3 -0
  121. package/dist/scene/objectStore.d.ts +10 -0
  122. package/dist/scene/objectStore.js +29 -6
  123. package/dist/scene/sceneKinds.d.ts +18 -0
  124. package/dist/scene/sceneKinds.js +19 -0
  125. package/dist/scene/sequenceDirector.d.ts +110 -0
  126. package/dist/scene/sequenceDirector.js +146 -0
  127. package/dist/session/roles.js +3 -2
  128. package/dist/settings/settingsModel.d.ts +1 -0
  129. package/dist/settings/settingsModel.js +1 -0
  130. package/dist/stats/rollCheck.js +4 -2
  131. package/dist/time/dayNightCycle.d.ts +114 -0
  132. package/dist/time/dayNightCycle.js +208 -0
  133. package/dist/time/timerSet.d.ts +132 -0
  134. package/dist/time/timerSet.js +243 -0
  135. package/dist/ui/accessibility.d.ts +51 -0
  136. package/dist/ui/accessibility.js +83 -0
  137. package/dist/ui/coachMarks.d.ts +99 -0
  138. package/dist/ui/coachMarks.js +126 -0
  139. package/dist/ui/floatingText.d.ts +114 -0
  140. package/dist/ui/floatingText.js +203 -0
  141. package/dist/ui/modalStack.d.ts +143 -0
  142. package/dist/ui/modalStack.js +160 -0
  143. package/dist/ui/objectiveBanner.d.ts +123 -0
  144. package/dist/ui/objectiveBanner.js +162 -0
  145. package/dist/ui/photoMode.d.ts +32 -0
  146. package/dist/ui/photoMode.js +51 -0
  147. package/dist/ui/radialMenu.d.ts +47 -0
  148. package/dist/ui/radialMenu.js +74 -0
  149. package/dist/ui/screenMarkers.d.ts +128 -0
  150. package/dist/ui/screenMarkers.js +118 -0
  151. package/dist/ui.d.ts +8 -0
  152. package/dist/ui.js +8 -0
  153. package/dist/vfx/cameraShake.d.ts +97 -0
  154. package/dist/vfx/cameraShake.js +136 -0
  155. package/dist/vfx/damageDirection.d.ts +102 -0
  156. package/dist/vfx/damageDirection.js +188 -0
  157. package/dist/vfx/particles.d.ts +103 -0
  158. package/dist/vfx/particles.js +256 -0
  159. package/dist/vfx/screenEffects.d.ts +149 -0
  160. package/dist/vfx/screenEffects.js +191 -0
  161. package/dist/world/authoredObjects.d.ts +18 -0
  162. package/dist/world/authoredObjects.js +21 -0
  163. package/dist/world/authoredSpawn.js +19 -0
  164. package/dist/world/buildingLots.d.ts +54 -11
  165. package/dist/world/buildingLots.js +116 -30
  166. package/dist/world/cityBlocks.d.ts +45 -0
  167. package/dist/world/cityBlocks.js +159 -0
  168. package/dist/world/cityContent.d.ts +46 -2
  169. package/dist/world/cityContent.js +160 -2
  170. package/dist/world/cityGenerator.d.ts +261 -23
  171. package/dist/world/cityGenerator.js +643 -33
  172. package/dist/world/cityGeometry.d.ts +20 -0
  173. package/dist/world/cityGeometry.js +91 -0
  174. package/dist/world/cityKind.js +1 -44
  175. package/dist/world/fastTravel.d.ts +64 -0
  176. package/dist/world/fastTravel.js +108 -0
  177. package/dist/world/features.d.ts +16 -0
  178. package/dist/world/features.js +2 -0
  179. package/dist/world/grounded.d.ts +11 -0
  180. package/dist/world/grounded.js +12 -0
  181. package/dist/world/mapAnnotations.d.ts +75 -0
  182. package/dist/world/mapAnnotations.js +139 -0
  183. package/dist/world/markers.js +1 -0
  184. package/dist/world/resourceNode.d.ts +1 -1
  185. package/dist/world/resourceNode.js +2 -1
  186. package/dist/world/roads.d.ts +294 -5
  187. package/dist/world/roads.js +1262 -21
  188. package/dist/world/sharedAnnotations.d.ts +84 -0
  189. package/dist/world/sharedAnnotations.js +76 -0
  190. package/dist/world/spawnOverride.d.ts +37 -0
  191. package/dist/world/spawnOverride.js +50 -0
  192. package/dist/world/streetGenerator.d.ts +60 -11
  193. package/dist/world/streetGenerator.js +1786 -129
  194. package/dist/world/terrain.d.ts +1 -0
  195. package/dist/world/terrain.js +2 -0
  196. package/dist/world/waypoints.d.ts +63 -0
  197. package/dist/world/waypoints.js +137 -0
  198. package/dist/world.d.ts +17 -2
  199. package/dist/world.js +17 -2
  200. package/package.json +1 -1
  201. package/skills/ce-handoff/SKILL.md +149 -0
  202. package/skills/game-design/SKILL.md +2 -0
  203. package/skills/jgengine/SKILL.md +3 -1
  204. package/skills/jgengine/api.md +17 -7
  205. package/skills/jgengine/capabilities.md +12 -0
  206. package/skills/jgengine/recipes/minimal-game.md +7 -4
  207. package/skills/jgengine-combat/api.md +40 -4
  208. package/skills/jgengine-combat/capabilities.md +12 -0
  209. package/skills/jgengine-combat/reference.md +2 -0
  210. package/skills/jgengine-gameplay/api.md +212 -11
  211. package/skills/jgengine-gameplay/capabilities.md +66 -1
  212. package/skills/jgengine-world/api.md +397 -11
  213. package/skills/jgengine-world/capabilities.md +123 -2
  214. package/skills/jgengine-world/reference.md +15 -1
@@ -4,6 +4,10 @@
4
4
 
5
5
  Reach for these before hand-rolling. Each row is *the thing you need* → *the primitive that already does it*.
6
6
 
7
+ ## achievements — track achievement/trophy unlocks over counter goals and boolean flags, with score, completion, an onUnlock seam, and serializable snapshot/restore
8
+
9
+ - `createAchievementTracker` (function) · `import { createAchievementTracker } from "@jgengine/core/gameplay"`
10
+
7
11
  ## advance-ledger — settle due scheduled transactions through a policy pipeline
8
12
 
9
13
  - `advanceLedger` (function) · `import { advanceLedger } from "@jgengine/core/gameplay"`
@@ -41,6 +45,10 @@ Reach for these before hand-rolling. Each row is *the thing you need* → *the p
41
45
  - `classifyClip` (function) · `import { classifyClip } from "@jgengine/core/game/clipRoles"`
42
46
  - `defaultAnimationForClips` (function) · `import { defaultAnimationForClips } from "@jgengine/core/game/clipRoles"`
43
47
 
48
+ ## codex — codex/bestiary/lorebook of defined entries with discovery tracking, categories, secret masking, completion, an onDiscover seam, and serializable state
49
+
50
+ - `createCodex` (function) · `import { createCodex } from "@jgengine/core/gameplay"`
51
+
44
52
  ## compose-game-loop — fold composable systems into the game loop without a manual tick fan-out
45
53
 
46
54
  - `composeGameLoop` (function) · `import { composeGameLoop } from "@jgengine/core/gameplay"`
@@ -84,6 +92,14 @@ Reach for these before hand-rolling. Each row is *the thing you need* → *the p
84
92
 
85
93
  - `createGameDialogue` (function) · `import { createGameDialogue } from "@jgengine/core/gameplay"`
86
94
 
95
+ ## dialogue-graph-view — select a conversation node's render-ready view (speaker, line, branching choices) from a serializable dialogue graph
96
+
97
+ - `selectDialogueView` (function) · `import { selectDialogueView } from "@jgengine/core/gameplay"`
98
+
99
+ ## dialogue-run — walk a serializable branching dialogue graph — current node view, choose-to-advance traversal, visited history, snapshot/restore
100
+
101
+ - `createDialogueRun` (function) · `import { createDialogueRun } from "@jgengine/core/gameplay"`
102
+
87
103
  ## durability — track item wear, breakage, and repair
88
104
 
89
105
  - `applyWear` (function) · `import { applyWear } from "@jgengine/core/gameplay"`
@@ -104,6 +120,10 @@ Reach for these before hand-rolling. Each row is *the thing you need* → *the p
104
120
 
105
121
  - `createGameFeed` (function) · `import { createGameFeed } from "@jgengine/core/gameplay"`
106
122
 
123
+ ## event-ticker — rolling capped, timed-fade event/kill-feed ticker of free-string entries over the feed helpers — push/recent-with-fade, snapshot/restore
124
+
125
+ - `createEventTicker` (function) · `import { createEventTicker } from "@jgengine/core/gameplay"`
126
+
107
127
  ## game-save — save/load game state with a pluggable backend, autosave, slots, and migration
108
128
 
109
129
  - `createSaveStore` (function) · `import { createSaveStore } from "@jgengine/core/gameplay"`
@@ -112,6 +132,10 @@ Reach for these before hand-rolling. Each row is *the thing you need* → *the p
112
132
 
113
133
  - `SystemDefinition` (interface) · `import { SystemDefinition } from "@jgengine/core/gameplay"`
114
134
 
135
+ ## group-credits — turn a flat list of credited things into ordered credit sections
136
+
137
+ - `groupCredits` (function) · `import { groupCredits } from "@jgengine/core/game/credits"`
138
+
115
139
  ## imprint-bonus — apply imprint stat and handler bonuses at an imprint fraction
116
140
 
117
141
  - `applyImprintBonus` (function) · `import { applyImprintBonus } from "@jgengine/core/game/breeding"`
@@ -161,6 +185,10 @@ Reach for these before hand-rolling. Each row is *the thing you need* → *the p
161
185
 
162
186
  - `createUseBehaviorRegistry` (function) · `import { createUseBehaviorRegistry } from "@jgengine/core/gameplay"`
163
187
 
188
+ ## key-rebinding — conflict-aware key-remap session over the action-binding model — capture/reassign, conflict detection, reset-to-defaults, persist overrides, snapshot/restore
189
+
190
+ - `createRebindSession` (function) · `import { createRebindSession } from "@jgengine/core/gameplay"`
191
+
164
192
  ## lap-splits — per-lap durations from a cumulative split book
165
193
 
166
194
  - `lapDurations` (function) · `import { lapDurations } from "@jgengine/core/gameplay"`
@@ -217,6 +245,10 @@ Reach for these before hand-rolling. Each row is *the thing you need* → *the p
217
245
 
218
246
  - `maturationStage` (function) · `import { maturationStage } from "@jgengine/core/game/breeding"`
219
247
 
248
+ ## merge-credits — fold generated and hand-authored credit documents into one, deduped by entry
249
+
250
+ - `mergeCredits` (function) · `import { mergeCredits } from "@jgengine/core/game/credits"`
251
+
220
252
  ## modular-item — attach parts into item mount slots to compute combined stats
221
253
 
222
254
  - `slotAccepts` (function) · `import { slotAccepts } from "@jgengine/core/gameplay"`
@@ -234,6 +266,10 @@ Reach for these before hand-rolling. Each row is *the thing you need* → *the p
234
266
  - `appendFeed` (function) · `import { appendFeed } from "@jgengine/core/gameplay"`
235
267
  - `pruneFeed` (function) · `import { pruneFeed } from "@jgengine/core/gameplay"`
236
268
 
269
+ ## notification-center — persistent, read-tracked notification log (newest-first, capped, serializable) behind an unread badge — the durable counterpart to transient toasts
270
+
271
+ - `createNotificationCenter` (function) · `import { createNotificationCenter } from "@jgengine/core/gameplay"`
272
+
237
273
  ## objectives — check progress of a threshold objective against a live metric
238
274
 
239
275
  - `evaluateObjective` (function) · `import { evaluateObjective } from "@jgengine/core/gameplay"`
@@ -308,6 +344,10 @@ Reach for these before hand-rolling. Each row is *the thing you need* → *the p
308
344
 
309
345
  - `createQuestJournal` (function) · `import { createQuestJournal } from "@jgengine/core/gameplay"`
310
346
 
347
+ ## quest-tracker-view — join a QuestDef + live QuestInstance into a flat labelled view for a quest/objective HUD tracker
348
+
349
+ - `describeTrackedQuest` (function) · `import { describeTrackedQuest } from "@jgengine/core/gameplay"`
350
+
311
351
  ## race-placements — look up one racer's place + win/lose within a finish order
312
352
 
313
353
  - `placementOf` (function) · `import { placementOf } from "@jgengine/core/gameplay"`
@@ -325,6 +365,10 @@ Reach for these before hand-rolling. Each row is *the thing you need* → *the p
325
365
 
326
366
  - `tierAt` (function) · `import { tierAt } from "@jgengine/core/gameplay"`
327
367
 
368
+ ## resolve-rng — resolve an optional injected RNG, warning once per site when it falls back to `Math.random`
369
+
370
+ - `resolveRng` (function) · `import { resolveRng } from "@jgengine/core/random/resolveRng"`
371
+
328
372
  ## resource-ledger — schedule recurring resource transactions with policy transforms
329
373
 
330
374
  - `createResourceLedger` (function) · `import { createResourceLedger } from "@jgengine/core/gameplay"`
@@ -351,6 +395,14 @@ Reach for these before hand-rolling. Each row is *the thing you need* → *the p
351
395
 
352
396
  - `createRunDraft` (function) · `import { createRunDraft } from "@jgengine/core/gameplay"`
353
397
 
398
+ ## save-slots — serializable save-slot / profile metadata index — write/clear/rename/mostRecent over free-string per-slot meta, powering New/Continue/Load/Delete menus, with snapshot/restore
399
+
400
+ - `createSaveSlots` (function) · `import { createSaveSlots } from "@jgengine/core/gameplay"`
401
+
402
+ ## scoreboard — pure tie-aware ranking selector over the leaderboard model — standard/dense ranks, local-entry highlight, top-N, medal tokens for a reskinnable table
403
+
404
+ - `rankLeaderboard` (function) · `import { rankLeaderboard } from "@jgengine/core/gameplay"`
405
+
354
406
  ## seeded-random — injected deterministic randomness for game logic — never `Math.random` in a simulation
355
407
 
356
408
  - `seededRng` (function) · `import { seededRng } from "@jgengine/core/gameplay"`
@@ -359,6 +411,10 @@ Reach for these before hand-rolling. Each row is *the thing you need* → *the p
359
411
 
360
412
  - `setValue` (function) · `import { setValue } from "@jgengine/core/gameplay"`
361
413
 
414
+ ## shop-grid — serializable vendor/shop stock with buy/sell over a caller-owned wallet — finite/unlimited qty, sell-back, restock/setPrice, snapshot/restore
415
+
416
+ - `createShopStock` (function) · `import { createShopStock } from "@jgengine/core/gameplay"`
417
+
362
418
  ## social-emotes — emotes and social interactions between nearby players
363
419
 
364
420
  - `createSocial` (function) · `import { createSocial } from "@jgengine/core/gameplay"`
@@ -379,6 +435,14 @@ Reach for these before hand-rolling. Each row is *the thing you need* → *the p
379
435
 
380
436
  - `compileSystemSchedule` (function) · `import { compileSystemSchedule } from "@jgengine/core/gameplay"`
381
437
 
438
+ ## talent-tree-view — flatten a talent tree into a placed, per-node render view — branch/tier layout, learned/available/locked/maxed state, prerequisite edges
439
+
440
+ - `talentTreeView` (function) · `import { talentTreeView } from "@jgengine/core/gameplay"`
441
+
442
+ ## talent-tree-view-from — build a placed talent/upgrade-tree render view from any per-node unlock rule (points, currency, level, flag) — branch/tier layout, learned/available/locked/maxed state, prerequisite edges
443
+
444
+ - `talentTreeViewFrom` (function) · `import { talentTreeViewFrom } from "@jgengine/core/gameplay"`
445
+
382
446
  ## tick-work — advance jobs over time, completing work and emitting typed lifecycle events
383
447
 
384
448
  - `tick` (function) · `import { tick } from "@jgengine/core/gameplay"`
@@ -388,8 +452,9 @@ Reach for these before hand-rolling. Each row is *the thing you need* → *the p
388
452
  - `appendToast` (function) · `import { appendToast } from "@jgengine/core/gameplay"`
389
453
  - `createToastQueue` (function) · `import { createToastQueue } from "@jgengine/core/gameplay"`
390
454
 
391
- ## touch-controls — default on-screen button silhouette for a touch action
455
+ ## touch-controls — switch the on-screen touch control set when gameplay context changes (enter/exit vehicle, mount, build mode)
392
456
 
457
+ - `setTouchControlsMode` (function) · `import { setTouchControlsMode } from "@jgengine/core/gameplay"`
393
458
  - `touchButtonShape` (function) · `import { touchButtonShape } from "@jgengine/core/gameplay"`
394
459
 
395
460
  ## tribe-group — shared-ownership group (tribe/guild/clan) with ranked permissions, group vs personal assets, alliances, and a bounded event log