"The Last Survivor" is a survival game where players navigate various challenges to stay alive. This game is written in Python and aims to provide an immersive experience with engaging gameplay mechanics and a captivating story.
This project requires Python 3.6+ and Git installed on your machine. If you need to install them, click on the respective links.
To run the game locally, follow these steps (if you install this game, please give it a view and maybe a star):
- Clone the repository:
git clone https://github.com/LeoLeman555/The_Last_Survivor.git
- Navigate to the project directory:
cd The_Last_Survivor
- Create a virtual environment (recommended):
python -m venv venv
- Activate the virtual environment:
- On Windows:
venv\Scripts\activate
- On macOS/Linux:
source venv/bin/activate
- Install the required dependencies:
pip install -r requirements.txt
- Start the game:
python ./main.py
If you'd like to create a standalone .exe
file for The Last Survivor, you can use cx_Freeze. Follow these steps:
-
Verify the setup.py file: Make sure the provided
setup.py
file is in the root directory of the project. This file includes the necessary configuration for building the executable. -
Run the build command: Use the following command to generate the
.exe
file:python setup.py build
This command will create a build directory containing your .exe
file and other necessary files.
-
Locate the executable: After the build process is complete, navigate to the newly created build folder. Inside, you'll find the
.exe
file namedThe Last Survivor.exe
. -
Distribute the game: To share the game, package the .exe along with the files in the
build
folder into a compressed archive (e.g., a .zip file) for easier distribution.
Note: Make sure all assets and required files (e.g., images, sounds, data files) are included in the build folder. The setup.py
script is configured to include these files, so double-check that the paths are correct.
⚠️ Warning: Creating the executable withcx_Freeze
only works on Windows. If you're using another operating system (Linux or macOS), the executable cannot be generated using this method.
However, you can still run the game directly via Python as explained in the Installation section.
- Start the game using the command above.
- Use the arrow keys to move your character.
- Collect resources, avoid dangers, and try to survive as long as possible.
- Immersive Gameplay => Detailed environments and challenging scenarios.
- Resource Management => Collect and manage resources to stay alive.
- Dynamic Challenges => Encounter various dangers that test your survival skills.
We welcome contributions from the community. To contribute:
- Fork the repository.
- Create a new branch:
git checkout -b feature/YourFeature
- Make your changes and commit them:
git commit -m "Add your message here"
- Push to the branch:
git push origin feature/YourFeature
- Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for more details.
For any questions or feedback, feel free to contact me:
- Léo Leman : My GitHub Profile