Fantasy Forge is a framework for creating and playing text adventure games. The game data is stored in toml files. It is planned that the framework will work separately from the game and the content can be exchanged. It is currently still in an early stage of development, if you want to try it out follow the installation instructions.
If you don't have it, install uv using the installer or, if you have it, pipx.
curl -LsSf https://astral.sh/uv/install.sh | sh
# or
pipx install uv
Clone the repo, change into the directory, and run uv fantasy-forge
to start the game. uv
will create a fitting virtualenv for you.
# clone the repo
git clone https://github.com/pythonfoo/fantasy_forge
cd fantasy_forge
# run the command
uv run fantasy-forge
# or call the module
uv run -m fantasy_forge
You can set a debug level to write debugging output to ./fantasy_forge.log
.
Contributions are very welcome <3. Please commit one thing at a time to keep things simple and neat. We'll probably have a look at them during pythonfoo, if you don't mind.
If you installed uv
, you can use uvx to install pre-commit.
Pre-commit checks, among other things, that the code doesn't contain syntax errors and is well formatted.
# install `pre-commit`
uvx install pre-commit
# install the pre-commit file (.pre-commit-config.yaml) with
pre-commit install
# run it (perhaps multiple times), to see if everything works
pre-commit run --all-files
Unittests via pytest live in ./tests/unittests
Integration tests via hitchstory and pytest are in ./tests/integration