Skip to content

RouaCoder/Space-Invaders

Repository files navigation

🚀 Alien Invasion Game – Pygame

📌 Description

This project is a classic Alien Invasion arcade-style game developed with Python and Pygame.

The goal of the game is simple:

Destroy all incoming aliens before they reach the base.
If an alien touches the player, the game ends.
The player earns points for every alien destroyed.

This project is based on an existing codebase that I improved, adding new features, more polished gameplay, better visuals, and sound effects.

🎮 Features

✔️ Core Gameplay

  • Player movement between lanes
  • Random alien and object spawning
  • Collision detection
  • Score system
  • Game Over screen
  • Replay system (“Y” to play again / “N” to exit)

✔️ Enhancements I Added

  • Reworked game structure and logic
  • Added background music
  • Added sound effects (coin collection, game over)
  • Coin/collectible system
  • Smoother movement & animations
  • Cleaner sprite management
  • Pause system
  • Improved collision detection
  • More polished UI & visual layout
  • Fully commented and organized code

🕹️ Gameplay

  1. Move left/right to avoid enemies.
  2. Collect coins to increase your score (if enabled).
  3. If an alien hits the player → Game Over.
  4. Choose:
    • Y → Restart
    • N → Quit

⌨️ Controls

Key Action
Move Left
Move Right
SPACE Pause/Resume
Y Replay after Game Over
N Quit after Game Over

🛠️ Installation & Setup

1. Clone the repository

git clone https://github.com/your-username/alien-invasion-game.git
cd alien-invasion-game
pip install pygame
python main.py

⚡ Improvements Over Original Version

🎨 Visual & UI Upgrades

  • Animated lane markers
  • Cleaner environment and layout
  • Better sprite scaling and positioning

🔊 Audio Enhancements

  • Background music added
  • Coin collection sound
  • Game Over sound

🎮 Gameplay Enhancements

  • Coin/bonus system
  • Balanced game speed
  • Replay option
  • Pause system
  • Improved object spawning logic

🧠 Code Quality Improvements

  • Organized sprite classes
  • Better collision logic
  • Reduced repetition
  • Improved readability and maintainability
  • Added documentation and comments

🎥 Demonstration Video

SOC Lab Demo

🚧 Future Improvements

Potential additions to be implemented later:

  • Shooting mechanic
  • Different alien types with unique speeds
  • Power-ups (shield, speed boost, etc.)
  • Main menu & settings page
  • High score saving system
  • Difficulty levels
  • Mobile-friendly version

🏆 Credits

  • Developed by Roua (Ha Rou)
  • Built with Python 3 and Pygame
  • Assets from open-source free resources
  • Based on a basic existing codebase and then fully improved and expanded

About

A fast-paced arcade-style game built using Python and Pygame

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages