A fun little pygame program to help improve my python skills. Why not Asteroids?!
- Clock (
pygame.time.Clock): Controls frame rate and game timing - Sprite Groups (
pygame.sprite.Group): Manages game objects- Updatable sprites
- Drawable sprites
- Asteroid sprites
- Shot sprites
- List: List for array operations
- Class Inheritance: Base
CircleShapeclass extended by:PlayerShotAsteroidAlien
- Event System: Handles player input and game events
- Collision Detection: Manages object interactions
- Score System:
- AWS DynamoDB
- Local display of current and high scores during gameplay
- Scores stored by unique hostname/username
| Key | Action |
|---|---|
| ↑ (Up Arrow) | Thrust Forward |
| ↓ (Down Arrow) | Thrust Backward |
| ← (Left Arrow) | Rotate Left |
| → (Right Arrow) | Rotate Right |
| Space | Fire |
| P | Pause Game |
-
python3 -m pip install -U pygame==2.6.0
-
- Included in requirements.txt
- AWS credentials required for high score feature
-
python -m venv C:\path\to\new\virtual\environment
git clone https://github.com/code-qtzl/asteroids.git
cd asteroids
source venv/bin/activate
python main.py
Not my video, but found it to be a fun watch on the history of Asteroids.
Feel free to reach out to collab or if you have and questions!



