Megamania
[COMPLETE]A modern web recreation of the classic 1982 Atari 2600 arcade shooter, built entirely with TypeScript and HTML5 Canvas—featuring all 8 original enemy waves, power-ups, and an arcade-style leaderboard.
A Gift for Dad
My dad spent countless hours in the early '80s playing Megamania on his Atari 2600. When I started experimenting with game development in the browser, I knew exactly what to build.

The original Megamania was designed by Steve Cartwright at Activision. Instead of traditional space invaders, you defend against increasingly absurd enemies: hamburgers, cookies, bugs, radial tires, diamonds, steam irons, bow ties, and space dice. It's gloriously weird.
Built in a Single Context Window
Here's what still blows my mind: the entire working game was built in a single Claude Code context window.
I started with a detailed plan—entity system, wave management, collision detection, the whole architecture. Claude Code took that plan and generated over 4,500 lines of TypeScript across 15+ files. The first playable version had just one bug: the dice wave had a movement issue that took maybe 10 minutes to fix.
The Enemy Waves
Each wave has its own movement pattern, faithful to the original:

- Hamburgers - Simple horizontal movement, good for warming up
- Cookies - Slightly faster, tighter formations
- Bugs - Erratic zigzag patterns
- Radial Tires - Bounce off edges unpredictably
- Diamonds - Diagonal sweeps across the screen
- Steam Irons - Aggressive diving attacks
- Bow Ties - Complex figure-eight patterns
- Space Dice - The final challenge: fast and chaotic
After wave 8, you enter the MegaCycle—all waves repeat with increased speed and aggression.
Modern Additions
While staying true to the original, I added some quality-of-life features:

- Power-ups: Rapid fire, shields, energy boost, and score multipliers drop randomly from defeated enemies
- Difficulty settings: Easy, Normal, and Hard modes affect enemy speed and fire rate
- Leaderboards: Arcade-style 3-letter initials, tracked per difficulty level
- Mobile support: Touch controls for playing on phones and tablets
- Procedural audio: All sound effects synthesized with the Web Audio API—no audio files needed
Zero Dependencies
The entire game runs with zero runtime dependencies. It's pure TypeScript compiled to vanilla JavaScript, rendering to an HTML5 Canvas. The only dev dependencies are Vite (for bundling) and TypeScript itself.

This was intentional. I wanted to understand every pixel, every frame, every collision. No game engine magic—just math and the Canvas API.
The reaction: When I showed my dad the finished game, he immediately recognized it. "That's Megamania!" He played for 20 minutes straight. Worth every line of code.