This is my solution to the Python Crash Course Part II Project 1, Alien Invasion. In this game, a player can control a rocket ship to defend against an invading fleet of aliens. Dark mode is supported.
- Player: controls the rocket ship at the bottom center
- arrow key: ship to right/left
- spacebar: shoot bullets
- A fleet of aliens:
- Fills the sky and moves across and down the screen at the start of the game.
- All aliens are destroyed: a new and faster fleet appears
- Losing a ship :
- If an alien hits the ship
- If an alien reaches the bottom of the screen
- Game end: Player loses 3 ships
- Create the basic structure of the game include:
- Game backgroud
- Ship and bullets settings and control
- Create aliens and the move of the fleet
- Track game statistics with
game_active
flag
- Set Game Play button
- Elements' speed settings
- Implementing the scoring system
I created a toggle button that allows users to switch between light and dark modes.
- 21/06/24: Dark mode created but toggle button and the main game window are seperated.