A Python implementation of the classic Asteroids arcade game using Pygame.
- Python 3.13+
- uv package manager
git clone <repo-url>
cd asteroids
uv syncTo install uv if you don't have it:
curl -LsSf https://astral.sh/uv/install.sh | shuv run python main.py| Key | Action |
|---|---|
| A | Rotate ship counter-clockwise |
| D | Rotate ship clockwise |
| W | Move Ship Up |
| S | Move Ship Down |
| Spacebar | Shoot projecticles |
- Classic Asteroids-style physics with momentum
- Screen wrapping for player and asteroids
- Asteroids split into smaller pieces when destroyed
- Shooting cooldown system
asteroids/
├── main.py # Game loop and initialization
├── player.py # Player ship logic
├── asteroid.py # Asteroid behavior
├── asteroidfield.py # Asteroid spawning
├── shot.py # Bullet mechanics
├── circleshape.py # Base collision shape
└── constants.py # Game configuration