
Asteroids
This was the project that turned programming from an exercise into an obsession. I started with p5.js because it made the draw loop and canvas trivial, which meant every problem left over was a real problem: how does a ship rotate and thrust with momentum? How do you wrap objects around screen edges without visual popping? How do you detect collisions between irregular shapes cheaply enough to run every frame?
The core loop is classic Asteroids — ship physics driven by vector math (heading, acceleration, friction), asteroids that split into smaller fragments on hit, and screen-wrap toroidal space. Where I pushed past the original was the power-up system: drops with distinct effects ([rapid fire, shields, multi-shot — swap for your actual set]), each with spawn logic, pickup detection, timed duration, and UI feedback. That forced my first real encounter with software architecture — power-ups touched the ship, the bullets, the HUD, and the spawn system all at once, and my initial "one giant sketch file" approach collapsed under it. Refactoring into classes (Ship, Asteroid, Bullet, PowerUp) was my first genuine lesson in why structure matters.
The struggles were formative: circle-based collision that felt unfair on elongated asteroids, frame-rate-dependent movement before I understood delta time, and state bugs where power-up timers leaked across lives. None of it was elegant by my current standards — which is exactly why I keep it in the portfolio. It's the baseline everything else is measured against.