| raylib@e17e0933af | ||
| .gitignore | ||
| .gitmodules | ||
| atom.png | ||
| courier_golmod.otf | ||
| evsel2024_en.xml | ||
| evsel2024_nl.xml | ||
| Makefile | ||
| raygui.h | ||
| README.md | ||
| textadventure_multilang.c | ||
Serendiep text adventure
Textadventure for Serendiep labyrinth, rewritten in c, using raylib to render in either a destop window or directly to a (DRM) framebuffer.
Dependencies:
- Raylib: https://www.raylib.com/
- Mini-XML: https://www.msweet.org/mxml/
Raylib is included as a submodule, the rest can be installed with:
sudo apt-get install libmxml-dev
To fetch or update the raylib code, after cloning or updating this repository run:
git submodule update --init
This will fetch the right version of raylib into the raylib subdirectory, updating or initializing it as needed.
Building
Compilation can be done as a single gcc command (after rayblib was already compiled). These commands are automated and documented in the Makefile.
For a full build you can run:
make(ormake drm) to get a direct framebuffer build. You typically run this on the rpi to run without a windowing system. Note that this does not do cross-compilation, it just selects the graphics output to use.make debugto get a framebuffer build with debugging symbols (i.e. for gdb debugging).make desktopto get a X/Wayland build to run on a normal PC. This build also includes debugging symbols.
These commands always do a clean rebuild of raylib. Once a full build was done, you can also build just the textadventure itself (avoiding a few seconds of raylib rebuild) with:
make textadventure
The output selection happens only in the raylib, so the textadventure build itself is identical regardless of the output selected.
Running
To run the game, run:
./textadventure
Note that the * key is used for the ⚛ key (which you might need in the game).
Debug mode
To run in debug mode, pass --debug on the commandline.
./textadventure --debug
Debug mode speeds up output generation for faster testing, and adds some commands.
To jump to a given scene:
go key_of_scene
To display all current state:
state
To eval an expression, for example to modify state:
eval name_of_var SET 1
Passing --debug also enables more log output.