https://github.com/codewithjazmine/asteroids
A classic Asteroids-style shooter built with Python and Pygame. Navigate, shoot, and dodge your way through an asteroid field. Built as part of a Boot.dev Python challenge.
https://github.com/codewithjazmine/asteroids
asteroids game-development pygame python
Last synced: 8 months ago
JSON representation
A classic Asteroids-style shooter built with Python and Pygame. Navigate, shoot, and dodge your way through an asteroid field. Built as part of a Boot.dev Python challenge.
- Host: GitHub
- URL: https://github.com/codewithjazmine/asteroids
- Owner: CodeWithJazmine
- Created: 2025-05-15T16:16:12.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-16T20:10:48.000Z (about 1 year ago)
- Last Synced: 2025-05-28T05:17:24.426Z (about 1 year ago)
- Topics: asteroids, game-development, pygame, python
- Language: Python
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Asteroids

**Asteroids** is a classic arcade-style shooter game recreated using Python and Pygame. Players control a spaceship that can rotate, thrust forward, and fire shots to destroy drifting asteroids in space. The game features responsive controls, real-time collision detection, and modular code architecture to support future gameplay expansion.
This project was developed as a solo challenge to reinforce core Python concepts and explore game development using Pygame. It helped strengthen my understanding of game loops, object-oriented programming, and 2D physics systems.
## Gameplay
- Rotate the ship with the **left/right arrow keys**
- Thrust forward with the **up arrow key**
- Fire shots with the **spacebar**
- Avoid and destroy the asteroids to survive!
https://github.com/user-attachments/assets/cc043b7c-7e64-4db7-a10a-40beacd2ef57
## Tech Stack
- Python 3.9+
- Pygame 2.6.1
- VS Code
## How to play
### 1. Clone the Repository
```bash
git clone https://github.com/CodeWithJazmine/Asteroids.git
cd Asteroids
```
### 2. Install dependencies
```bash
pip install -r requirements.txt
```
### 3. Run the game
```
python main.py
```
## Key Features
- Modular, object-oriented architecture
- Smooth 2D movement and circular collision detection
- Separate systems for player movement, shooting, and asteroid spawning
- Reusable CircleShape class for accurate collisions
## Planned Features
- [ ] Add a scoring system
- [ ] Multiple lives with respawning
- [ ] UI elements for score and lose condition
### Boot.dev Project
Built as part of a Python coding challenge on [Boot.dev](https://boot.dev/).