# Phase 1: Foundation - Research **Researched:** 2026-03-10 **Domain:** HTML5 Canvas game loop, HiDPI rendering, keyboard input, ball physics, collision detection **Confidence:** HIGH ## Summary Phase 1 Foundation for Super Pong establishes core technical infrastructure: a responsive game loop with proper timing, sharp HiDPI-aware canvas rendering, responsive keyboard input for paddle control, and physics simulation for ball movement with zone-based paddle deflection. The phase requires solving three critical problems: (1) maintaining smooth frame-rate-independent physics despite variable refresh rates, (2) rendering crisp graphics on high-DPI displays without performance degradation, and (3) minimizing input lag for responsive paddle control. Vanilla JavaScript is the standard approach—no frameworks, single HTML file, module-pattern organization. **Primary recommendation:** Use `requestAnimationFrame()` with delta-time physics (frame-rate independent movement), implement HiDPI canvas scaling via `devicePixelRatio`, track keyboard state with boolean flags updated on keydown/keyup events, and use simple AABB collision detection for wall/paddle bouncing. --- ## User Constraints (from CONTEXT.md) ### Locked Decisions - Single HTML file with everything embedded (JS + CSS in one `