Alien Invasion is a game built using the pygame library. This README file provides instructions for building and running the game.
Before you begin, ensure you have met the following requirements:
- You have installed Python 3.x.
- You have installed the pygame library or just install the requirements.txt depenedences.
- You have installed pyinstaller. You can install it using pip:
pip install pyinstaller
To build the game, use the following pyinstaller command which packages the main.py
script along with the necessary data and image directories into a single executable file:
pyinstaller --onefile --add-data "data:data" --add-data "imgs:imgs" main.py
This will generate a dist
directory containing the executable file.
To run the game, navigate to the dist
directory and execute the generated file:
- On Windows:
dist\main.exe
- On macOS/Linux:
./dist/main
Enjoy playing Alien Invasion!
pyinstaller --onefile --add-data "data:data" --add-data "imgs:imgs" main.py