An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

          

# Asteroids
Screenshot 2025-05-16 at 12 14 54 PM

**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/).