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.
- 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)
- 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
- Move left/right to avoid enemies.
- Collect coins to increase your score (if enabled).
- If an alien hits the player → Game Over.
- Choose:
- Y → Restart
- N → Quit
| Key | Action |
|---|---|
| ← | Move Left |
| → | Move Right |
| SPACE | Pause/Resume |
| Y | Replay after Game Over |
| N | Quit after Game Over |
git clone https://github.com/your-username/alien-invasion-game.git
cd alien-invasion-game
pip install pygame
python main.py- Animated lane markers
- Cleaner environment and layout
- Better sprite scaling and positioning
- Background music added
- Coin collection sound
- Game Over sound
- Coin/bonus system
- Balanced game speed
- Replay option
- Pause system
- Improved object spawning logic
- Organized sprite classes
- Better collision logic
- Reduced repetition
- Improved readability and maintainability
- Added documentation and comments
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
- 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
