COTEN for short, is a classic roguelike built with python and the libtcod library. It has a castlevania-esque setting, a dark castle filled with creatures of the night, that you have to climb to defeat the evil vampire lord.
This project uses UV for dependency management. Install UV, then:
uv sync # install everything
uv run main.py # launch the gameThis will:
- Download the correct Python version (3.11.x) if needed
- Create a virtual environment (
.venv/) - Install all dependencies (including dev tools like Nuitka)
Or activate the environment and run directly:
# Windows
.venv\Scripts\activate
python main.py
# macOS / Linux
source .venv/bin/activate
python main.pyMouse: Click anywhere you've explored to move there. Click on items / enemies to interact or attack. Auto-movement will stop when you see an enemy.
Arrows, VIM keys and numpad for movement.
F1 show help menu
. Wait turn
i Inventory
g grab item
d drop item
c character sheet
f shot ranged weapon
/ inspect surroundings (also mouse pointer)
q quick heal (uses a potion from the inventory)
< and > go downstairs or upstairs
uv add <package-name>uv sync --upgradeuv run python --version
uv treeuv run nuitka --standalone --onefile --disable-console --include-data-dir=assets=assets --output-filename=coten main.pyNote: You can't use Python > 3.11 for the build, as Nuitka does not yet support it.
Every push to master triggers a GitHub Action that:
- Installs UV via
astral-sh/setup-uv - Runs
uv sync --frozen(uses the lockfile, no network resolution) - Builds a standalone executable with Nuitka on macOS, Ubuntu, and Windows
- Uploads the resulting binaries as build artifacts
You can also trigger the workflow manually from the Actions tab.
| File | Purpose |
|---|---|
pyproject.toml |
Project metadata, dependencies, UV config |
uv.lock |
Lockfile for reproducible installs |
.python-version |
Pins Python 3.11.x |
.github/workflows/build.yml |
CI pipeline for building executables |