https://github.com/haliphax/rl
Textmode roguelike prototype
https://github.com/haliphax/rl
Last synced: 10 months ago
JSON representation
Textmode roguelike prototype
- Host: GitHub
- URL: https://github.com/haliphax/rl
- Owner: haliphax
- License: mit
- Created: 2023-10-05T15:24:57.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-03T21:44:45.000Z (over 1 year ago)
- Last Synced: 2025-03-11T02:46:31.365Z (about 1 year ago)
- Language: Python
- Size: 131 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# rl
Is roguelike, yes?

## Setup
### Develop
These steps are only necessary if you wish to contribute to the project.
Development setup
Use [`nvm`][] to select the appropriate node version:
```shell
nvm use # you may need to `nvm install` first
```
Install node-based developer dependencies:
```shell
npm ci
```
Use [`pyenv`][] (or your virtual environment manager of choice) to create a
virtualenv with Python 3.12.1:
```shell
pyenv install 3.12.1
pyenv virtualenv 3.12 rl
pyenv activate rl
```
Install the project and its dependencies as editable:
```shell
pip install -e .[dev]
```
### Play
If you just want to run the game, you will first need Python 3.12.1. You can
either create a virtual environment or use docker.
Use [`pyenv`][] (or your virtual environment manager of choice) to create a
virtualenv with Python 3.12.1:
```shell
pyenv install 3.12.1
pyenv virtualenv 3.12 rl
pyenv activate rl
```
Install dependencies:
```shell
pip install .
```
Docker
To run the application in a docker container, build the image:
```shell
docker build -t rl:latest .
```
This image will need to be rebuilt any time `pyproject.toml` or requirements
are changed. Code/map changes will be reflected when running with live code (as
described below), otherwise the image will need to be rebuilt to incorporate
code/map changes, as well.
## Execute
Activate your virtual environment (ex. pyenv):
```shell
pyenv activate rl
```
Run the installed Python module:
```shell
python -m rl
```
Docker
Run a container using the previously-built image code/map files:
```shell
docker run --rm -it rl
```
Run a container with live code/map files (to test changes):
```shell
docker run --rm -it -v $(pwd)/rl:/app/rl rl
```
[`nvm`]: https://github.com/nvm-sh/nvm/blob/master/README.md#installing-and-updating
[`pyenv`]: https://github.com/pyenv/pyenv/blob/master/README.md#installation