A fun, kid-friendly Space Invaders game featuring colorful Pac-Man style ghosts!
Free Play at: http://ghost-invaders.anthony-wu.com
No logins, no ads, Wi-Fi not required.
- Bun
- A modern web browser
- Clone or download this repository
- Navigate to the project directory
- Install dependencies:
bun install
Start the development server:
just devThen open your browser and navigate to: http://localhost:5173/
- Left/Right Arrow Keys: Move your spaceship
- Spacebar: Shoot projectiles at the ghosts
- N Key: Fire a nuke (available once per minute)
- ESC: Pause/unpause the game
- Colorful rainbow ghosts that dodge your shots
- Score tracking (10 points per ghost, 50 for nuke kills)
- Special nuke power-up that clears half the screen
- Increasing difficulty as you play
To build the game for deployment:
bun run buildThe built files will be in the dist directory.
To preview the production build:
bun run previewVibe coded with a very tight leash.
Core Technologies:
- TypeScript - Type-safe JavaScript for robust game logic
- Vite - Lightning-fast build tool and dev server
- HTML5 Canvas API - Hardware-accelerated 2D graphics rendering
Game Architecture:
- Object-Oriented Design - Modular classes for Player, Ghost, Projectile, and Game entities
- Game Loop Pattern - 60 FPS update/render cycle using
requestAnimationFrame - Entity-Component System - Composable visual effects and behaviors
Audio System:
- Web Audio API - Dynamic sound effect generation and spatial audio
- HTML5 Audio - Background music playback with seamless looping
- Procedural Audio - Custom-generated retro sound effects using oscillators
Graphics & Effects:
- Particle Systems - Explosion and visual effect animations
- Parallax Scrolling - Multi-layer star field for depth
- Sprite Animation - Frame-based ghost animations
- Dynamic Scaling - Responsive design for all screen sizes
Modern Web Features:
- ES Modules - Clean dependency management
- Async/Await - Smooth resource loading
- Touch Events - Full mobile/tablet support
- Performance API - Precise timing and optimization
See SPEC.md for detailed technical specifications.