Skip to content

Repository files navigation

Retro Space Shooter - Milestone 1 Complete! 🚀

A retro-style top-down space shooter built with Phaser.js featuring smooth 8-directional movement, enemy waves, and explosive action!

✅ Milestone 1 Features Implemented

Core Mechanics

  • Player Ship with smooth 8-directional movement (WASD or Arrow Keys)
  • Shooting System with mouse click or spacebar
  • Enemy Spawning with progressive difficulty
  • Two AI Patterns: Straight down and sine wave movement
  • Collision Detection for bullets vs enemies and player vs enemies
  • Health System with 3 lives and invulnerability frames
  • Explosion Effects with 5-frame animation
  • Parallax Background with 2 scrolling layers
  • Score System with high score persistence
  • Game Over State with restart functionality
  • Sound Effects for shooting, hits, and explosions

🎮 How to Play

Starting the Game

npm install    # First time only
npm start      # Starts server on http://localhost:8080

Then open your browser to: http://localhost:8080

Controls

  • Movement: WASD or Arrow Keys (8-directional)
  • Shoot: Hold Spacebar or Hold Left Mouse Button
  • Restart: Press Space or Click after Game Over

Gameplay

  • Destroy enemies to increase your score
  • Avoid colliding with enemies (you have 3 lives)
  • After taking damage, you get 2 seconds of invulnerability (ship flashes)
  • Enemy spawn rate increases over time
  • Try to beat your high score!

📁 Project Structure

space-shooter/
├── assets/
│   ├── sprites/        # Player, enemies, projectiles
│   ├── effects/        # Explosion animations
│   ├── backgrounds/    # Parallax layers
│   └── sounds/         # Audio files
├── src/
│   ├── entities/
│   │   ├── Player.js       # Player ship class
│   │   ├── Enemy.js        # Enemy AI
│   │   └── Projectile.js   # Bullet class
│   ├── scenes/
│   │   ├── BootScene.js      # Asset loading
│   │   ├── GameScene.js      # Main gameplay
│   │   └── GameOverScene.js  # Game over screen
│   ├── utils/
│   │   └── Config.js      # Game constants
│   └── main.js           # Game initialization
├── index.html
├── package.json
├── GAME_SPEC.md         # Full game specification
└── README.md

🎯 Milestone 1 Success Criteria

All targets achieved:

  • ✅ Smooth, responsive player movement
  • ✅ Satisfying shooting mechanics with audio feedback
  • ✅ Two distinct enemy movement patterns
  • ✅ Fair collision detection with visual feedback
  • ✅ 5+ minutes of engaging gameplay
  • ✅ Progressive difficulty that keeps players engaged
  • ✅ Complete game loop: Play → Die → Restart

🎨 Assets Used (Milestone 1)

Sprites

  • Player: ship1.png from SpaceShipShooter pack
  • Enemies: enemy-small-1.png, enemy-small-2.png from SpaceShipShooter pack
  • Projectile: laser-bolt1.png from SpaceShipShooter pack

Effects

  • Explosions: 5-frame animation from SpaceShipShooter pack

Backgrounds

  • Far Layer: blue-back.png from Space Background Pack
  • Star Layer: blue-stars.png from Space Background Pack

Audio

  • Shoot: shot 1.wav
  • Hit: hit.wav
  • Explosion: explosion.wav

All assets from Legacy Collection with proper licensing.

🔧 Configuration

Edit src/utils/Config.js to tweak gameplay:

Config.player.speed = 200;        // Player max speed
Config.player.maxLives = 3;       // Starting lives
Config.player.shootDelay = 200;   // Milliseconds between shots
Config.enemy.spawnDelay = 2000;   // Milliseconds between waves
Config.projectile.speed = 400;    // Bullet speed

🚀 Next Steps (Milestone 2)

Coming in Milestone 2:

  • 🔫 3-tier weapon upgrade system
  • 💎 4 types of power-ups
  • 👾 Medium and large enemy types
  • 🎯 Combo scoring system with multipliers
  • 🪨 Asteroid obstacles
  • 🎨 Enhanced parallax with planets
  • 📊 Complete UI overhaul

See GAME_SPEC.md for the complete roadmap!

🐛 Known Issues

None! Milestone 1 is complete and fully playable.

🎉 Playtesting Notes

The game is designed for ~5 minutes of engaging arcade action. Key features:

  • Responsive controls feel tight and precise
  • Enemy variety keeps gameplay interesting
  • Progressive difficulty maintains challenge
  • Score system encourages replays
  • Sound design provides satisfying feedback

Game is ready for playtesting and feedback!

📝 License

Assets from Legacy Collection. Code is MIT licensed.


Milestone 1 Status: ✅ COMPLETE AND PLAYABLE

Ready to start Milestone 2? Let's add power-ups, more enemy types, and combo scoring!

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages