To make and install:
make clobber all
sudo make installTo run one instance of rogomatic, try:
./run_rogoAn easy way to "gently kill" a running rogomatic session is to run:
./end_playerTo have rogomatic continuously start another rogue game after the explorer dies:
./rerun_rogo -a 2.5It is recommended that while ./rerun_rogo is running, in another window run:
./unstuck_player -v 1Also creating the local file, .stopfile:
touch .stopfilewill cause ./rerun_rogo to stop restarting rogomatic when rogue(6) exits.
This rogomatic code is designed to be used with rogue version 5.4.5 release 2026-06-30, or any later release of version 5.4.5.
See rogue version 5.4.5 for the latest version of rogue that is supported by rogomatic.
Use of other rogue, especially older rogue games is NOT recommended, nor supported.
After you have successfully built everything:
make clobber allyou may wish to use some of the helper scripts:
If one uses the supplied script ./rerun_rogo, then when the rogue(6) game ends
(say because the rogue dies in the dungeon), then a new Rogomatic will be launched.
To use:
./rerun_rogoIt is recommended that while ./rerun_rogo is running, in another window run:
./unstuck_player -v 1To view the top rogue scores generated by ./rerun_rogo:
rogue -s /var/tmp/rogo/rogue.scrDue to the issue #10 bug,
after starting ./rerun_rogo in one window, also launch ./unstuck_player
in another window so that when Rogomatic hangs, the session will be
"gently terminated" allowing ./rerun_rogo to start another session.
While ./rerun_rogo is running, in another window try:
./unstuck_player -v 1This has the added advantage of allowing ./player to update (if needed),
the genetic state, and to allow the rogue(6) game to update (if needed),
tor score file. In some cases, the rogue save file may be used to
manually restart the rogue game.
You may find it challenging to terminate the running rogue(6) game as
well as the ./player process that was launched by ./rerun_rogo.
Use ./end_player to "gently terminate" the running rogue(6) game
as well as the ./player process that was launched by ./rerun_rogo.
This has the added advantage of allowing ./player to update (if needed),
the genetic state, and to allow the rogue(6) game to update (if needed),
tor score file. In some cases, the rogue save file may be used to
manually restart the rogue game.
The ./rerun_rogo uses the script ./run_rogo to launch a new Rogomatic
controlled rogue(6) game.
This NOT a script, but rather a file that will cause ./rerun_rogo
to
to stop launching new Rogomatic controlled rogue(6) games.
HINT: If you create a file called .stopfile ...
touch .stopfile... while ./rerun_rogo is rolling, then it will NOT start a new
session when the current session ends. This is needed because interrupts
(such as via ^C (control C)) are caught by the rogue(6) game, or by
the ./player process. And if you are truly impatient, create the
.stopfile and then run ./end_player.
When ./rerun_rogo detects the .stopfile and ends the rerun loop,
it will remove .stopfile.
Tools such as ./run_rogo (and ./rerun_rogo which calls ./run_rogo)
use the following non-default rogomatic directory (called RGMDIR):
/var/tmp/rogo
The RGMDIR is used by ./rogomatic, ./player, as well as the
rogue(6) games that are launched.
This means that if you run rogue(6) "by hand" using the game's default
files (see man rogue), you will NOT interfere with any rogue(6)
game that is being managed by rogomatic.
This also means that the rogue(6) score file, and related rogue lock
files will be independent. For example, to print the rogue score file
used by ./rerun_rogo and friends, you need to run:
rogue -s /var/tmp/rogo/rogue.scrThe rogue(6) game used by ./rerun_rogo and friends is searched for as follows:
- ./rogue
In the same directory as ./rerun_rogo and friends, so you could put
a symlink to some path to a rogue executable.
- ../rogue5.4/rogue
If you have cloned https://github.com/lcn2/rogue5.4 under the same parent directory that you cloned https://github.com/lcn2/rogomatic, and compiled that rogue game, then that executable will be used.
- rogue
The rogue(6) game will be searched for along your $PATH environment variable.
The ./rogomatic binary will also launch the ./player program, which
in turn will play the rogue(6) game.
The ./player command used by ./rerun_rogo and friends is searched for as follows:
- ./player
In the same directory as ./rerun_rogo and friends, so you could put
a symlink to some path to a rogue executable.
- player
The player command will be searched for along your $PATH environment variable.
See the rogomatic(6) man page for additional information on how to run rogomatic.
After compiling, and prior to installing, you may review the local copy of the man page:
man ./rogomatic.6If your system as issues compiling this code, try editing Makefile as needed.
- Modern C compiler (c17/gnu17 or better)
- Modern
make(1)(recommend GNU make) - Ncurses (<ncurses.h> and libncurses), or for NetBSD, NetBSD curses is likely to work
- Single UNIX Specification confirming (or reasonably conforming) operating system such as Linux, macOS, BSD, etc.
The rogomatic repo started out as a clone of the rogueforge rogomatic14 repo.
IMPORTANT NOTE: This rogomatic code is designed to be used with rogue version 5.4.5 release 2026-06-30, or any later release of version 5.4.5.
See rogue version 5.4.5 for the latest version of rogue that is supported by rogomatic.
Use of other rogue, especially older rogue games is NOT recommended, nor supported.
This code is based on the rogueforge rogomatic14 repo.
The rogomatic repo improves on the above mentioned repo in several important aspects:
- Improved the C source to be able to compile under recent C compilers
- Fixed several bugs in the rogue code
- Compatible with the BSD rogue5.4 repo
- etc.
We very much welcome fork rogomatic pull requests to fix any:
- failure to compile
- compiler warning messages
- program crashes
To report a security issue, please visit "Reporting Security Issues".