A classic game of Asteroids built using Pygame as a Boot.dev project and then enhanced with additional features.
-
Install Python 3.12 or higher.
-
Install Pygame:
pip install pygame
-
Clone the repository:
git clone https://github.com/UnLuckyNikolay/asteroids cd asteroids
-
Run:
python3 main.py
- Comprehensive movement mechanics
- Vector graphics for the UI, Player, Asteroids, animated Explosions and background stars
- Two weapons:
- Plasma Gun - shoots balls of plasma, has 3 levels, upgraded automatically based on the current score
- Bomb Launcher - leaves bombs that explode after a short interval
- Four types of asteroids:
- Normal - 3 sizes, breaks into 2 smaller asteroids
- Explosive - always big, breaks into 8 small asteroids in all directions
- Golden - always small, increased speed and point value
- Homing - always small, follows the player
- Difficulty increase with time
- Configurable game settings via
constants.py
(including screen resolution, player stats, asteroid spawns and debug options) - Local leaderboards
W
/S
- Accelerate/decelerateA
/D
- RotateSpace
- Shoot the current weapon1
- Switch to the Plasma Gun2
- Switch to the Bomb Launcher
- Movement system that implements inertia and speed-up time for both moving and turning
- Game loop that uses delta and collision checks
- Point system that is used for upgrading the Plasma Gun at certain thresholds and for building a local leaderboard (saved in JSON file)
This project is licensed under the MIT License - see the LICENSE file for details.