This game comes from the book, Python Crash Course, 3rd Edition, by Eric Mattes. I'm reading via O'Reilly's learning platform: https://learning.oreilly.com/library/view/python-crash-course/9781098156664/c12.xhtml
In Alien Invasion, the player controls a rocket ship that appears at the bottom center of the screen. The player can move the ship right and left using the arrow keys and shoot bullets using the spacebar. When the game begins, a fleet of aliens fills the sky and moves across and down the screen. The player shoots and destroys the aliens. If the player destroys all the aliens, a new fleet appears that moves faster than the previous fleet. If any alien hits the player’s ship or reaches the bottom of the screen, the player loses a ship. If the player loses three ships, the game ends.
To run the game, ensure you are running a version of Python close to 3.13. The book calls for 3.9 or later, so we'll go with that.
Then you will need to install the required packages (TO Documment). Consider using pyinstaller.
In your terminal, run
python3 alien_invasion.py