diff --git a/.planning/ROADMAP.md b/.planning/ROADMAP.md index 83731e0..a3e06d7 100644 --- a/.planning/ROADMAP.md +++ b/.planning/ROADMAP.md @@ -35,7 +35,11 @@ 4. Ball angle changes based on where it hits the paddle (not purely geometric) 5. Ball speed increases gradually over the course of a match -**Plans**: TBD +**Plans:** 2 plans + +Plans: +- [ ] 01-01-PLAN.md — HTML scaffold, HiDPI canvas, Renderer, GameLoop, Input, Player 1 paddle +- [ ] 01-02-PLAN.md — Ball physics: movement, wall bounce, zone-based deflection, speed increment --- @@ -133,7 +137,7 @@ | Phase | Plans Complete | Status | Completed | |-------|----------------|--------|-----------| -| 1. Foundation | 0/? | Not started | — | +| 1. Foundation | 0/2 | Planned | — | | 2. Core Gameplay | 0/? | Not started | — | | 3. Complete Experience | 0/? | Not started | — | | 4. Polish & Depth | 0/? | Not started | — | @@ -142,3 +146,4 @@ --- *Roadmap created: 2026-03-10* +*Phase 1 planned: 2026-03-10* diff --git a/.planning/phases/01-foundation/01-01-PLAN.md b/.planning/phases/01-foundation/01-01-PLAN.md new file mode 100644 index 0000000..fc7c746 --- /dev/null +++ b/.planning/phases/01-foundation/01-01-PLAN.md @@ -0,0 +1,335 @@ +--- +phase: 01-foundation +plan: 01 +type: execute +wave: 1 +depends_on: [] +files_modified: [index.html] +autonomous: true +requirements: [VFX-05, CORE-07] + +must_haves: + truths: + - "Canvas fills the entire browser window with no scrollbars or white space" + - "Canvas resizes immediately when the window is resized, maintaining minimum 4:3 aspect ratio" + - "Graphics render sharply on HiDPI/Retina displays (no blurry ball or paddle edges)" + - "Pressing W moves Player 1 paddle up; pressing S moves it down — responsively with no OS key-repeat lag" + - "Game loop runs continuously at device refresh rate; GameLoop, Renderer, Input objects exist in global scope" + artifacts: + - path: "index.html" + provides: "Complete HTML scaffold with embedded CSS, canvas element, and all four module objects" + contains: "GameLoop, Physics, Renderer, Input" + - path: "index.html" + provides: "HiDPI canvas setup — devicePixelRatio scaling applied on init and resize" + contains: "devicePixelRatio" + - path: "index.html" + provides: "Full-window canvas with aspect ratio enforcement and resize handler" + contains: "window.addEventListener('resize'" + - path: "index.html" + provides: "Keyboard input state tracking for W/S keys" + contains: "KeyW, KeyS" + key_links: + - from: "GameLoop.main()" + to: "requestAnimationFrame" + via: "window.requestAnimationFrame(this.main.bind(this))" + pattern: "requestAnimationFrame" + - from: "Renderer.init()" + to: "devicePixelRatio" + via: "canvas bitmap scale + ctx.scale(dpr, dpr)" + pattern: "devicePixelRatio" + - from: "Input.getVerticalInput()" + to: "GameLoop update cycle" + via: "Physics.update() queries Input.getVerticalInput() each frame" + pattern: "getVerticalInput" +--- + + +Create the complete HTML scaffold for Super Pong Next Gen: a single index.html with embedded CSS, a full-window HiDPI-aware canvas, and the four core module objects (GameLoop, Renderer, Input, Physics skeleton). After this plan, the canvas renders sharply on Retina displays, fills the window with correct aspect ratio on resize, the game loop is running, and Player 1 can move a visible paddle with W/S keys. + +Purpose: Every subsequent phase builds on this foundation. The module structure established here is the architecture all later phases extend. +Output: index.html — runnable directly in a browser with no build step. + + + +@/home/dabit/.claude/get-shit-done/workflows/execute-plan.md +@/home/dabit/.claude/get-shit-done/templates/summary.md + + + +@.planning/PROJECT.md +@.planning/ROADMAP.md +@.planning/STATE.md +@.planning/phases/01-foundation/01-CONTEXT.md +@.planning/phases/01-foundation/01-RESEARCH.md + + + + + + Task 1: HTML scaffold, HiDPI canvas, and full-window Renderer + index.html + +Create index.html from scratch. It must contain exactly: + +**HTML structure:** +```html + + + + + + Super Pong Next Gen + + + + + + + +``` + +**CSS (inside `