134 lines
13 KiB
Markdown
134 lines
13 KiB
Markdown
{
|
||
"version": 3,
|
||
"id": "mu3lln4y-51f5mi",
|
||
"objective": "=== Goal ===\nObjective: Make Orbit's combat both feel and read — sharper ship handling plus clear hit/kill/death feedback (VFX + SFX) and a readability layer (target indicator, damage numbers, kill feed, bar hit-flash), kept in sync across the training range (/combat) and the main-game combat (index.html?combat).\n\nSuccess criteria (observable):\n- In BOTH contexts, each of: firing, bullet impact, shield hit, hull hit, enemy kill, player-down, and player-respawn produces a distinct VFX and a distinct SFX.\n- Readability layer is live in both contexts: damage numbers on every hit (enemy and player), a target/lock indicator on the current target, threat cues for hostiles, a kill feed, and a visible hit-flash on the combat bar's shields/hull gauges.\n- Ship handling feels noticeably better in the range (WASD) — responsive thrust/rotation/brake, all values living in data/combat.json and shared with the main game.\n- node dev/combat.test.mjs passes with 0 failures; CDP screenshots (dev/cdp-shot.mjs pattern) show the new feedback in both /combat and index.html?combat; the README combat section documents the new feedback set and dev hooks.\n\nBoundaries:\n- IN SCOPE: js/combat/* (Combat.js, CombatSystem.js, CombatScene.js, Fx.js, EnemyShip.js, Bullet.js), js/ui/CombatBar.js, data/combat.json, SFX wiring, both combat contexts.\n- OUT OF SCOPE: real skill implementations (the 1–8 seats stay as stubs on the system's cast() stub), new enemy types/AI/behavior variety, waves/difficulty/escalation, permanent death or economy flows, non-combat game systems (map, jump gates, economy), new sprite art.\n\nConstraints:\n- Phaser 4 UMD + plain ES6 modules, no build step; hand-rolled circle collision checks only (no arcade colliders), per the existing combat architecture.\n- No new binary assets: VFX must be procedural (canvas dot textures / additive glows, Fx.js style); SFX must go through the existing data/sfx.json + playSfx() infrastructure using existing sound files only.\n- Pure rules stay in js/combat/Combat.js (pure, unit-tested); ALL tuning numbers live in data/combat.json; the range and the main game must share the same rules and numbers (no divergent copies).\n- Skill seats 1–8, the energy gauge, and the auto-fire model are left as-is (stub/placeholder behavior unchanged).\n\nVerification contract:\n1) node dev/combat.test.mjs → 0 failures. 2) CDP-driven visual checks of BOTH /combat and index.html?combat (dev/cdp-shot.mjs pattern) capturing: damage numbers, target indicator, kill feed, bar hit-flash, kill burst, player-down/respawn cues. 3) Manual flow checklist passed in both contexts: fire → muzzle flash + shot SFX; enemy hit → impact flash + damage number; shield/hull hit → bar flash + appropriate SFX; enemy kill → burst + kill-feed entry + explosion SFX; player down → down cue + respawn cue. 4) Re-read this goal's success criteria and confirm each is addressed before marking complete.\n\nIf blocked: stop and ask the user (default blocker rule).",
|
||
"status": "complete",
|
||
"autoContinue": true,
|
||
"usage": {
|
||
"tokensUsed": 26772762,
|
||
"activeSeconds": 15915
|
||
},
|
||
"sisyphus": false,
|
||
"createdAt": "2026-09-16T04:26:00.418Z",
|
||
"updatedAt": "2026-09-16T09:04:06.574Z",
|
||
"revision": 368,
|
||
"scheduler": {
|
||
"version": 1,
|
||
"owner": "01a0a871-e065-702a-82c0-0d2f07bc718c",
|
||
"generation": "d0ea2130-f3b3-4b18-9766-cbf9099ec156",
|
||
"used": 1,
|
||
"phase": "running",
|
||
"repairUsed": true,
|
||
"decision": {
|
||
"kind": "ready",
|
||
"nextAction": "The prior execution did not declare a disposition. Declare ready with a concrete next action, wait with a deadline, or complete/pause/block. This is the only repair prompt.",
|
||
"purpose": "repair"
|
||
},
|
||
"dispatch": {
|
||
"id": "3bfbf874-69e5-4dcc-94dd-48b33ee597af",
|
||
"kind": "repair",
|
||
"claimedAt": 1789532760444
|
||
}
|
||
},
|
||
"taskList": {
|
||
"tasks": [
|
||
{
|
||
"id": "task-1",
|
||
"title": "Baseline audit: inventory current feedback + bar state in both contexts",
|
||
"status": "complete",
|
||
"verificationContract": "A gap list (in goal notes / a short doc) mapping each success-criterion feedback type to what exists today in range vs main game vs CombatBar; no code changes.",
|
||
"completedAt": "2026-09-16T04:33:51.611Z",
|
||
"evidence": "Audit doc at .pi/goals/combat-feedback-audit.md; baseline node dev/combat.test.mjs passes (all checks green)"
|
||
},
|
||
{
|
||
"id": "task-2",
|
||
"title": "Ship handling feel pass (player.* in data/combat.json, both contexts)",
|
||
"status": "complete",
|
||
"verificationContract": "Tuned thrust/rotSpeed/drag/brake (+ micro-feel tweaks in Combat.js rules if needed); range fly-check feels responsive; pure rules still covered by dev/combat.test.mjs (0 failures).",
|
||
"completedAt": "2026-09-16T06:19:40.252Z",
|
||
"evidence": "Committed 5949bac: pure handleFeel (exact integration) + combat.player tuning (thrust 2000/drag 1.8/rot 6.4/brake 0.9); WASD fixed (addKeys comma-list bug → event API); dev/combat.test.mjs 0 failures;"
|
||
},
|
||
{
|
||
"id": "task-3",
|
||
"title": "Combat SFX layer: fire/impact/shield/hull/kill/down/respawn via sfx.json + playSfx",
|
||
"status": "complete",
|
||
"verificationContract": "Each listed event fires its SFX in BOTH /combat and index.html?combat; wiring is shared (no per-context copies); no new sound files.",
|
||
"completedAt": "2026-09-16T06:48:29.382Z",
|
||
"evidence": "Committed: shared js/combat/CombatSfx.js (7 distinct voices from existing sfx.json: fire=scan, impact=ui_click, shield=solar_buzz, hull=mining_split, kill=thunder×4 random, down=deconstruct, respawn=d"
|
||
},
|
||
{
|
||
"id": "task-4",
|
||
"title": "Feedback VFX pass: damage numbers, impact flash tuning, kill burst, player down/respawn cues (shared Fx layer)",
|
||
"status": "complete",
|
||
"verificationContract": "Every listed cue renders in both contexts from one shared Fx path; CDP screenshots show damage numbers, kill burst, and down/respawn cues.",
|
||
"completedAt": "2026-09-16T07:07:02.596Z",
|
||
"evidence": "Committed ecff203: Fx.js gains damage() (cyan=shield/orange=hull numbers), color-coded hit flashes, enhanced kill burst (delayed 2nd shockwave), down() + respawn() cues, shared FX_COLORS. Both context"
|
||
},
|
||
{
|
||
"id": "task-5",
|
||
"title": "Readability layer: target indicator, threat cues, kill feed, CombatBar hit-flash on shields/hull",
|
||
"status": "complete",
|
||
"verificationContract": "Target/lock indicator tracks the current target; off-screen/threat cues appear; kill feed lists kills; bar gauges flash on player hits — verified via CDP screenshots in both contexts.",
|
||
"completedAt": "2026-09-16T08:03:23.497Z",
|
||
"evidence": "Commit 0d51184: CombatHud shared (lock reticle, threat cues, off-screen arrows, kill feed, gauge flash); pickTarget/feedPush/offscreenArrow in Combat.js; resyncAroundShip fixes main-game pack placemen"
|
||
},
|
||
{
|
||
"id": "task-6",
|
||
"title": "Parity + verification: range/main-game sync, tests, README combat section update",
|
||
"status": "complete",
|
||
"verificationContract": "node dev/combat.test.mjs 0 failures; CDP screenshot set for both contexts committed as evidence; README combat section documents the new feedback, SFX, and dev hooks; success-criteria checklist re-read and all items confirmed.",
|
||
"completedAt": "2026-09-16T08:59:41.074Z",
|
||
"evidence": "combat.test.mjs 96 checks + sfx.test.mjs 21 checks = 0 failures; sfxcheck PASS both contexts (7 events); gauge-flash/lock/threat/feed verified in both; combat-shot.mjs → dev/shots/combat-range.png + c"
|
||
}
|
||
],
|
||
"blockCompletion": true,
|
||
"proposedAt": "2026-09-16T04:25:18.473Z"
|
||
},
|
||
"stopReason": "agent",
|
||
"archivedPath": ".pi/goals/archived/goal_2026091603040656_mu3lln4y-51f5mi.md"
|
||
}
|
||
|
||
# Goal Prompt
|
||
|
||
=== Goal ===
|
||
Objective: Make Orbit's combat both feel and read — sharper ship handling plus clear hit/kill/death feedback (VFX + SFX) and a readability layer (target indicator, damage numbers, kill feed, bar hit-flash), kept in sync across the training range (/combat) and the main-game combat (index.html?combat).
|
||
|
||
Success criteria (observable):
|
||
- In BOTH contexts, each of: firing, bullet impact, shield hit, hull hit, enemy kill, player-down, and player-respawn produces a distinct VFX and a distinct SFX.
|
||
- Readability layer is live in both contexts: damage numbers on every hit (enemy and player), a target/lock indicator on the current target, threat cues for hostiles, a kill feed, and a visible hit-flash on the combat bar's shields/hull gauges.
|
||
- Ship handling feels noticeably better in the range (WASD) — responsive thrust/rotation/brake, all values living in data/combat.json and shared with the main game.
|
||
- node dev/combat.test.mjs passes with 0 failures; CDP screenshots (dev/cdp-shot.mjs pattern) show the new feedback in both /combat and index.html?combat; the README combat section documents the new feedback set and dev hooks.
|
||
|
||
Boundaries:
|
||
- IN SCOPE: js/combat/* (Combat.js, CombatSystem.js, CombatScene.js, Fx.js, EnemyShip.js, Bullet.js), js/ui/CombatBar.js, data/combat.json, SFX wiring, both combat contexts.
|
||
- OUT OF SCOPE: real skill implementations (the 1–8 seats stay as stubs on the system's cast() stub), new enemy types/AI/behavior variety, waves/difficulty/escalation, permanent death or economy flows, non-combat game systems (map, jump gates, economy), new sprite art.
|
||
|
||
Constraints:
|
||
- Phaser 4 UMD + plain ES6 modules, no build step; hand-rolled circle collision checks only (no arcade colliders), per the existing combat architecture.
|
||
- No new binary assets: VFX must be procedural (canvas dot textures / additive glows, Fx.js style); SFX must go through the existing data/sfx.json + playSfx() infrastructure using existing sound files only.
|
||
- Pure rules stay in js/combat/Combat.js (pure, unit-tested); ALL tuning numbers live in data/combat.json; the range and the main game must share the same rules and numbers (no divergent copies).
|
||
- Skill seats 1–8, the energy gauge, and the auto-fire model are left as-is (stub/placeholder behavior unchanged).
|
||
|
||
Verification contract:
|
||
1) node dev/combat.test.mjs → 0 failures. 2) CDP-driven visual checks of BOTH /combat and index.html?combat (dev/cdp-shot.mjs pattern) capturing: damage numbers, target indicator, kill feed, bar hit-flash, kill burst, player-down/respawn cues. 3) Manual flow checklist passed in both contexts: fire → muzzle flash + shot SFX; enemy hit → impact flash + damage number; shield/hull hit → bar flash + appropriate SFX; enemy kill → burst + kill-feed entry + explosion SFX; player down → down cue + respawn cue. 4) Re-read this goal's success criteria and confirm each is addressed before marking complete.
|
||
|
||
If blocked: stop and ask the user (default blocker rule).
|
||
|
||
## Progress
|
||
|
||
- Status: complete
|
||
- Auto-continue: on
|
||
- Sisyphus mode: no
|
||
- Time spent: 4h25m15s
|
||
- Tokens used: 27M (26,772,762) tokens
|
||
## Tasks
|
||
|
||
<!-- blockCompletion: true -->
|
||
- [x] task-1: Baseline audit: inventory current feedback + bar state in both contexts — evidence: Audit doc at .pi/goals/combat-feedback-audit.md; baseline node dev/combat.test.mjs passes (all checks green)
|
||
- [x] task-2: Ship handling feel pass (player.* in data/combat.json, both contexts) — evidence: Committed 5949bac: pure handleFeel (exact integration) + combat.player tuning (thrust 2000/drag 1.8/rot 6.4/brake 0.9); WASD fixed (addKeys comma-list bug → event API); dev/combat.test.mjs 0 failures;
|
||
- [x] task-3: Combat SFX layer: fire/impact/shield/hull/kill/down/respawn via sfx.json + playSfx — evidence: Committed: shared js/combat/CombatSfx.js (7 distinct voices from existing sfx.json: fire=scan, impact=ui_click, shield=solar_buzz, hull=mining_split, kill=thunder×4 random, down=deconstruct, respawn=d
|
||
- [x] task-4: Feedback VFX pass: damage numbers, impact flash tuning, kill burst, player down/respawn cues (shared Fx layer) — evidence: Committed ecff203: Fx.js gains damage() (cyan=shield/orange=hull numbers), color-coded hit flashes, enhanced kill burst (delayed 2nd shockwave), down() + respawn() cues, shared FX_COLORS. Both context
|
||
- [x] task-5: Readability layer: target indicator, threat cues, kill feed, CombatBar hit-flash on shields/hull — evidence: Commit 0d51184: CombatHud shared (lock reticle, threat cues, off-screen arrows, kill feed, gauge flash); pickTarget/feedPush/offscreenArrow in Combat.js; resyncAroundShip fixes main-game pack placemen
|
||
- [x] task-6: Parity + verification: range/main-game sync, tests, README combat section update — evidence: combat.test.mjs 96 checks + sfx.test.mjs 21 checks = 0 failures; sfxcheck PASS both contexts (7 events); gauge-flash/lock/threat/feed verified in both; combat-shot.mjs → dev/shots/combat-range.png + c
|
||
|