Skip to content

Building a clone of the classic Asteroids game using Pygame and object-oriented programming concepts.

Notifications You must be signed in to change notification settings

NeilNeel/Asteroids

Repository files navigation

🪐 Pygame Asteroids

A simple but fun clone of the classic Asteroids arcade game, built using Python and Pygame. This project was created as part of the Boot.dev game development course, and includes basic physics, shooting mechanics, and splitting asteroids!


🚀 Features

  • Player-controlled spaceship that can rotate, thrust, and shoot
  • Floating and splitting asteroids
  • Collision detection and basic physics
  • Modular code structure with OOP design

🗂️ Project Structure

ASTEROIDS/
├── asteroid.py        # Asteroid class logic
├── asteroidfield.py   # Manages all asteroids
├── circleshape.py     # For drawing and collision of circular objects
├── constants.py       # Game constants like speed, colors, screen size
├── main.py            # Game entry point
├── player.py          # Player spaceship class
├── shot.py            # Bullet class
├── requirements.txt   # Dependencies (Pygame)
└── README.md          # You're reading it!

🛠️ Requirements

  • Python 3.7+
  • Pygame

Install dependencies with:

pip install -r requirements.txt

▶️ How to Run the Game

After installing requirements, run the game using:

python main.py

Use your keyboard to control the ship:

  • 🔼 Up Arrow — Thrust
  • ◀️ / ▶️ Left/Right Arrows — Rotate
  • Spacebar — Shoot

📚 About the Project

This game was built as the final project for Boot.dev's "Build Your Own Asteroids Game" module. It demonstrates the use of Pygame, object-oriented programming, basic game physics, and a modular file structure.

🧠 Credits

  • Created by [Your Name Here]
  • Course by Boot.dev

🎮 License

MIT License — feel free to use or build on this code!

About

Building a clone of the classic Asteroids game using Pygame and object-oriented programming concepts.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages