Final Version — AsteroidDestroyer (Canvas Optimized) — Deployed! 🚀
What I worked on:
This is the one I’m most proud of. I rewrote the entire engine using HTML5 Canvas and a requestAnimationFrame game loop — no more DOM divs flying around. The ship, asteroids, UFOs, bullets, and particle explosions are all drawn in pure JS math every frame. This was also my first real experience writing JavaScript, so it took a lot of time to figure out, but I got there.
The result: a smooth, lag-free 60FPS game that stays fast even with tons of enemies on screen. Features include two enemy types (asteroids + zigzag UFOs), particle explosions, auto-shoot toggle, mobile touch support, and infinite level scaling.
The Git & GitHub struggle:
Honestly — Git almost broke me. I kept mixing up branches, overwriting things, and didn’t understand half the error messages. I used AI assistance to get through it, and I’m not embarrassed about that. The AI helped me understand why each command existed, and suggested structuring the commits as a version-by-version story. I thought that was a genuinely smart way to document progress.
Go try it!
🕹️ Play it here → dinithayehan.github.io/AsteroidDestroyer
A gameplay video is also here.
Honest thoughts:
It’s more intense than I expected — level 4+ gets chaotic fast. Auto-shoot turns it into a pure dodge game which feels totally different. UFOs might be a bit too punishing at high levels, but the thruster flame flicker is a detail I’m keeping.
What’s next:
This is deployed but not FINISHED.
Ideas:
highscore screen, wave mode, sound effects, local leaderboard, maybe an online one.
Drop suggestions in the comments or open a repo issue — genuinely open to ideas.