A Python implementation of the classic Asteroids arcade game using the pygame
library. Players control a spaceship, avoiding and destroying asteroids to earn points.
- Classic gameplay: Control a spaceship, destroy asteroids, and avoid collisions.
- Power-ups: Gain shields or double-fire capabilities.
- Realistic mechanics: Physics-based movement for asteroids and the spaceship.
- Dynamic difficulty: More asteroids and faster speeds as you progress.
Make sure you have Python 3.7+ installed on your system.
- Clone the repository:
git clone https://github.com/Shramkoweb/asteroids.git cd asteroids
- Install the required dependencies:
pip install -r requirements.txt
- Run the game:
python main.py
- Move the spaceship:
Arrow keys
: Rotate and thrust.Space
: Shoot lasers.
- Objective:
- Destroy all asteroids without being hit.
- Large asteroids break into smaller pieces when hit.
- Scoring:
- Points are awarded based on asteroid size: smaller asteroids yield more points.
- Game Over:
- Collision with an asteroid ends the game.
Action | Key |
---|---|
Rotate Left | Left Arrow |
Rotate Right | Right Arrow |
Thrust | Up Arrow |
Fire | Spacebar |
Quit | Escape |
WIP
- Fork the project.
- Create a new branch:
git checkout -b feature-name
- Commit your changes:
git commit -m "Add feature name"
- Push to the branch:
git push origin feature-name
- Open a pull request.
This project is licensed under the MIT License.