Asteroids is a classic arcade game where the player controls a spaceship in an asteroid field. The objective is to destroy asteroids and avoid collisions to survive as long as possible.
- Player-controlled spaceship
- Randomly generated asteroids
- Collision detection
- Asteroid health tracking
Make sure you have Python 3 or the latest version installed before proceeding.
- Clone the repository:
git clone https://github.com/luckstraw/asteroids.git
- Navigate to the project directory:
cd asteroids
- Create a virtual environment:
python3 -m venv venv
- Activate the virtual environment:
- On Windows:
.\venv\Scripts\activate
- On macOS and Linux:
source venv/bin/activate
- On Windows:
- Install the requirements:
pip install -r requirements.txt
- Run the Game:
python3 main.py
- Use the arrow keys to navigate the spaceship.
- Press the spacebar to shoot and destroy asteroids.
- Avoid collisions with asteroids to survive.
We welcome contributions! Please fork the repository and submit pull requests.