Space Invaders is a classic arcade-style shooter game developed in Python using the Pygame library. The objective is simple: navigate your spaceship, shoot down aliens, and avoid letting any enemies reach the bottom of the screen. Accumulate as many points as possible before you lose!
- Classic Arcade Gameplay: Relive the retro arcade experience with classic space shooter mechanics.
- Enemy Waves: Face waves of enemies that increase in difficulty over time.
- Scoring System: Keep track of your score to challenge your best record.
- Game Over Screen: A visual display appears when the game ends.
- Sound Effects and Background Music: Enhance the experience with laser sounds, explosions, and background music.
- Clone the repository:
git clone https://github.com/mohammedrashithkp/SpaceInvaders.git && cd SpaceInvaders
- Install the required dependencies:
pip install -r requirements.txt
- Run the game:
python spaceInvaders.py
- Use the Arrow keys to move your spaceship up, down, left, and right.
- Press SPACEBAR to shoot bullets at approaching enemies.
- Destroy all enemies to increase your score.
- Avoid letting any enemies reach the bottom of the screen—if they do, the game is over.
- The player controls a spaceship that can move in four directions.
- Shooting is only available when there is no active bullet on screen, adding a layer of strategy to timing your shots.
- Multiple enemies move across the screen and drop down periodically.
- Each enemy hit by the player’s bullet awards points.
- If an enemy reaches the player’s level, the game ends.
- A score counter displays at the top left of the screen, showing the player’s current score.
- Collision detection is calculated based on the distance between bullets and enemies. When an enemy is hit, the player is awarded points, and the enemy resets to a random position.
- Ufo icons created by smalllikeart - Flaticon
- Alien icons created by Pixel Buddha - Flaticon
- Spaceship icons created by Freepik - Flaticon
- Bullet icons created by Smashicons - Flaticon
This project is licensed under the MIT License. See the LICENSE file for details.