# Vector Asteroids — Requirement Traceability Matrix This matrix maps the original project requirements to concrete design coverage and acceptance verification. ## 1. Hosting and packaging requirements | Original requirement | Design coverage | Acceptance verification | |---|---|---| | Single self-contained `index.html` | `implementation-blueprint.md` sections 2–4 | `acceptance-checklist.md` sections 1–3 | | All CSS and JavaScript inline | Blueprint sections 2.2, 3 | Checklist sections 1.2, 3 | | No external files | Blueprint sections 2.1–2.4 | Checklist sections 1.1, 1.3 | | No CDN links | Blueprint sections 2.2, 27 | Checklist sections 1.2, 2.3, 3 | | No script src | Blueprint sections 2.2, 3 | Checklist sections 1.2, 3 | | No ES module imports | Blueprint sections 2.2, 4 | Checklist sections 1.2, 3 | | No npm/build/bundler/framework | Blueprint sections 2.3, 4 | Checklist sections 1.1, 1.2 | | Runs by opening file directly | Blueprint sections 2, 20 | Checklist sections 2.1, 12 | | No local asset fetches | Blueprint sections 2.2, 2.4, 27 | Checklist sections 1.3, 2.3, 3 | | Plain vanilla JS + Canvas 2D | Blueprint sections 2.3, 3, 17 | Checklist sections 1.3, 15 | | Web Audio synthesized at runtime | Blueprint section 19 | Checklist section 14 | ## 2. Visual requirements | Original requirement | Design coverage | Acceptance verification | |---|---|---| | Glowing neon vector aesthetic | Blueprint sections 17.1–17.4 | Checklist section 15 | | Black background | Blueprint sections 17.1, 17.3 | Checklist section 15 | | Parallax starfield | Blueprint sections 9.8, 18 | Checklist sections 5, 15 | | Canvas-drawn graphics | Blueprint sections 2.4, 17 | Checklist sections 1.3, 15 | | No image files | Blueprint sections 2.2, 2.4 | Checklist sections 1.3, 3 | | Subtle bloom/glow | Blueprint sections 17.4, 17.9 | Checklist section 15 | | Screen shake on big hits | Blueprint sections 15.7, 24.1 | Checklist sections 15, 17 | | Particle explosions | Blueprint sections 9.6, 24.1 | Checklist sections 8.2, 15 | | Bullet sparks | Blueprint section 24.2 | Checklist section 15 | | Thruster trail | Blueprint sections 12.3, 24 | Checklist sections 7, 15 | ## 3. Player ship requirements | Original requirement | Design coverage | Acceptance verification | |---|---|---| | Rotate left/right | Blueprint sections 11, 12.1 | Checklist sections 6, 7 | | Thrust | Blueprint sections 11, 12.2 | Checklist sections 6, 7 | | Momentum/inertia | Blueprint section 12.2 | Checklist section 7 | | Flickering engine flame | Blueprint sections 12.3, 17.6 | Checklist sections 7, 15 | | Fire bullets | Blueprint sections 12.4, 23.1 | Checklist sections 6, 7 | | Screen-wrap | Blueprint sections 12.5, 23 | Checklist sections 7, 8, 9 | | Optional hyperspace | Blueprint section 12.6 | Checklist sections 6, 7 | | Death and respawn | Blueprint section 12.7 | Checklist sections 7, 11 | | Temporary invulnerability | Blueprint sections 12.7, 15.6 | Checklist section 7 | ## 4. Asteroid requirements | Original requirement | Design coverage | Acceptance verification | |---|---|---| | Three asteroid sizes | Blueprint sections 13.1, 13.6 | Checklist section 8 | | Split into smaller ones when shot | Blueprint section 13.6 | Checklist section 8.2 | | Unique jagged polygon outline | Blueprint sections 9.3, 13.5 | Checklist section 8.1 | | Drift and rotate | Blueprint sections 13.3, 23.2 | Checklist section 8.1 | | Screen-wrap | Blueprint sections 12.5, 23.2 | Checklist sections 8.1, 9 | | Increasing waves | Blueprint sections 13.2, 13.3, 16.5, 16.6 | Checklist section 8.3 | | More/faster asteroids in later waves | Blueprint sections 13.2, 13.3, 16.6 | Checklist section 8.3 | | Fair spawning away from player | Blueprint section 13.4 | Checklist section 8.3 | ## 5. Saucer requirements | Original requirement | Design coverage | Acceptance verification | |---|---|---| | Occasional flying saucer enemy | Blueprint section 14.1 | Checklist section 10.1 | | Saucer shoots back | Blueprint section 14.4 | Checklist section 10.2 | | Saucer worth bonus points | Blueprint sections 14.6, 16.1 | Checklist sections 10.2, 11.2 | | Distinct saucer behavior | Blueprint sections 14.2–14.4 | Checklist section 10 | | Saucer audio | Blueprint sections 14.5, 19.4 | Checklist sections 10.2, 14 | | Saucer destruction effects | Blueprint section 14.6 | Checklist sections 10.2, 15 | ## 6. Audio requirements | Original requirement | Design coverage | Acceptance verification | |---|---|---| | Synthesized sound effects | Blueprint section 19 | Checklist section 14 | | Fire sound | Blueprint section 19.4 | Checklist section 14.2 | | Thrust sound | Blueprint section 19.4 | Checklist section 14.2 | | Explosion sounds | Blueprint section 19.4 | Checklist section 14.2 | | Saucer sound | Blueprint sections 14.5, 19.4 | Checklist section 14.2 | | Optional simple beat | Blueprint section 19.4 | Checklist section 14.2 | | No audio files | Blueprint sections 2.4, 19 | Checklist sections 1.3, 14.1 | | User-gesture audio unlock | Blueprint sections 11.4, 19.1 | Checklist sections 5, 14.1 | | Mute toggle | Blueprint sections 6.2, 11, 19.1 | Checklist sections 6, 14 | ## 7. Scoring, lives, and persistence requirements | Original requirement | Design coverage | Acceptance verification | |---|---|---| | Score display | Blueprint sections 16, 17.10 | Checklist section 11.1 | | Lives display | Blueprint sections 16.2, 17.10 | Checklist section 11.1 | | Level indicator | Blueprint sections 16.5, 17.10 | Checklist section 11.1 | | Extra life thresholds | Blueprint section 16.3 | Checklist section 11.3 | | High score persisted in localStorage | Blueprint sections 16.4, 20 | Checklist section 12 | | Safe localStorage fallback | Blueprint section 20.4 | Checklist section 12 | | Game over screen | Blueprint sections 6, 17.12 | Checklist section 11.4 | | Restart after game over | Blueprint sections 6.2, 17.12 | Checklist section 11.4 | ## 8. Screen/state requirements | Original requirement | Design coverage | Acceptance verification | |---|---|---| | Title/attract screen | Blueprint sections 6.3, 17.11 | Checklist section 5 | | Pause toggle | Blueprint sections 6.2, 17.13 | Checklist section 13 | | Clean game-over screen | Blueprint sections 6.2, 17.12 | Checklist section 11.4 | | Restart flow | Blueprint section 6.2 | Checklist section 11.4 | | Wave transition | Blueprint sections 6, 16.5 | Checklist sections 8.3, 11 | | Tab visibility safety | Blueprint sections 6.2, 26 | Checklist sections 13, 17 | ## 9. Input requirements | Original requirement | Design coverage | Acceptance verification | |---|---|---| | Keyboard primary | Blueprint section 11 | Checklist section 6 | | Arrows | Blueprint section 11.1 | Checklist section 6.1 | | WASD | Blueprint section 11.1 | Checklist section 6.1 | | Space fire/start | Blueprint section 11.1 | Checklist sections 5, 6.1 | | Controls shown on title | Blueprint sections 6.3, 17.11 | Checklist section 5 | | Touch controls nice bonus | Blueprint section 11.5 | Checklist sections 16 and optional manual review | | Prevent browser scroll | Blueprint section 11.3 | Checklist section 6.2 | ## 10. Runtime quality requirements | Original requirement | Design coverage | Acceptance verification | |---|---|---| | Smooth requestAnimationFrame loop | Blueprint sections 5.3, 22 | Checklist section 17 | | Frame-rate independent delta time | Blueprint sections 5.3, 22 | Checklist sections 7, 17 | | Responsive to window size | Blueprint sections 5.2, 21 | Checklist section 16 | | Robust after resize | Blueprint section 21.2 | Checklist sections 9, 16 | | Performance bounded | Blueprint sections 9.6, 23, 26 | Checklist section 17 | | Arcade-quality polish | Blueprint sections 17, 18, 24 | Checklist sections 15, 19 | ## 11. Milestone completeness conclusion The implementation plan covers every requested system: - packaging and static hosting constraints - rendering architecture - game loop and timing - entity model - player controls and physics - asteroid generation/splitting - saucer AI - collision handling - scoring/lives/waves - high score persistence - synthesized audio - neon vector visual design - pause/title/game-over states - responsive behavior - final acceptance validation The remaining work after this milestone is implementation of the single-file `index.html` according to this contract.