This is the educational project representing the game Alien Invasion
The game is implemented in the Python programming language using the pygame library. The project was implemented according to the OOP paradigm.
pygame
Install the required dependencies and run the alien_invasion.py file
The project contains 8 files:
- 👾 alien_invasion.py - contains AlienInvasion class (main game class)
- 👽 alien.py - contains Alien class (init aliens, aliens logic)
- 🔫 bullet.py - contains Bullet class (init bullets, bullets logic)
- ⚙️ settings.py - contains Settings class (init main game settings)
- 🚀 ship.py - contains Ship class (init ship, ship logic)
▶️ button.py - contains Button class (init button, button logic)- 🏆 scoreboard.py - contains Scoreboard class (init scoreboard)
- 📶 game_stats.py - contains GameStats class (init game stats)
The Alien Invasion game contains 8 classes:
class AlienInvasion # The main class in the game. Main game logic.
class Ship(Sprite) # Create the ship
class Settings # All of the settings in the game
class Alien(Sprite) # Create aliens
class Bullet(Sprite) # Create bullets
class GameStats # Initialize main game stats
class Button # Initialize buttons
class Scoreboard # Initialize scoreboard
The ship:
The intro window:
The Game: