/vigilant-carnival

A sci-fi roguelike developed with python 3.9 and pygame.

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

vigilant-carnival

vigilant-carnival (not a real name, the game is currently untitled so this is just a codename) is a sci-fi roguelike developed with python 3.9 and pygame.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

See build for notes on how to build the project to an executable, and how to build the docs.

Prerequisites

What things you need to install the software and how to install them

python v3.9

Installing

Create a virtual environment for python, and install the requirements via pip.

python -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Running the game

Once the requirements are installed, from your venv, run from the main directory:

python main.py

Usage

Saved games are located in the main directory under saves when DEBUG (constants.py) is True. Otherwise they are located in ~/.local/share/mygame/saves.

Logs are located in the main directory under logs when DEBUG (constants.py) is True. Otherwise they are located in ~/.local/share/mygame/logs.

Running the tests

vigilant-carnival uses python's unittest framework for tests. To run them:

python -m unittest

Build

Building the docs

vigilant-carnival uses sphinx for generating documentation.

To build, run:

./build-docs

alternatively:

cd docs
make html
cd ..
sphinx-apidoc -o docs/source/ .

With either of these methods, the docs site will output to docs/build.

Start an http server of your choice and navigate to index.html to read the docs.

Example:

cd docs/build
python -m http.server # site is available at http://localhost:8000/

Building the game executable

vigilant-carnival uses PyInstaller to bundle the application.

The PyInstaller spec file is located at mygame.spec.

To build, run:

./build-pyinstaller

alternatively:

pyinstaller mygame.spec -y --clean -n "mygame" --onefile

Using either of these methods, the executable will be created at dist/mygame.

Built With

  • pygame - library utilizing SDL for video game development
  • PyInstaller - Used to bundle executable
  • sphinx - Used to generate documentation

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

License

This project is licensed under the MIT License - see the LICENSE.md file for details