This is a recreation of Space Invaders using the Pygame library. This game is the first step of many toward my goal of becoming a capable software developer through project-based learning. I wanted to create something that others enjoy playing while gaining experience creating clean and modular code.
- Download the zip file from the GitHub repository.
- Extract the files from the zip archive into a folder.
- Run the executable file "SpaceInvadersWindows" or "SpaceInvadersLinux".
- Ensure that you have Python and Pygame installed.
- Use Git to clone the repository to your machine.
- Navigate to the "space-invaders" directory in your terminal.
- Run "python3 main.py".
The objective of this game is to beat your high-score! Eliminate all aliens to advance to the next level. The game ends when you run out of lives, or if the aliens make it past you.
- Use arrow keys to move left and right.
- Press spacebar to shoot a laser at your enemies.
- Have fun creating something that I can play and show others.
- Experiment with 2D movement, game loops, GUIs, and input handling.
- Learn about the Pygame library.
- Practice OOP fundamentals in Python.
- Develop the habit of building small and fun projects!
- Separating constants into their own modules improved readability, maintainability, and reduced coupling.
- Modularization tends to decouple code and reduce unnecessary dependencies.
- Separating related logic into different modules can create a layer of abstraction that makes code easier to understand by hiding lower-level implementation details.
- Game loops are intuitive once you understand the structure (update state, collision checks, draw to screen).
- Games present many problem solving opportunities such as movement, collision, timers, and state management.




