Jilles's Games page


Tarball of 1.4.6 with more efficient watching and a few other fixes (revision 336) and PGP signature.


With the new autoconf-ized version, no manual changes to Makefiles and header files are necessary. Here's an example configuration file for the dgl-create-chroot script and a configuration file for dgamelaunch for the Solaris machine I test dgamelaunch on (it's called crab). You may additionally need something like LD_RUN_PATH=/usr/local/lib or add -R/usr/local/lib to CFLAGS.

Programs for manipulating recordings

Most of these programs are under a 2-clause BSD license; check the comments in the source files for details. Send any patches to me.

Playttyrec 1.0 is my greatly improved ttyrec playback program, supporting moving backwards and forwards, searching and marks. Its purpose is the same as that of ttyplay, but it is not based on ttyplay code. Download the C source here (last modified 2004-10-15).Hints for compiling it and some usage information are inside. You need some sort of vt100-like terminal emulator, and some typical Un*x functions are used, so Windows users will have to use Cygwin, or do quite a lot of porting work.

Playnethack2 is a better attempt at faking timings for NetHack playback. This is necessary because the playback files from the /dev/null NetHack tournament do not contain any timing information, unlike those from dgamelaunch. Download the C source here (last modified 2003-11-08). Hints for compiling it and some usageinformation are inside. You need some sort of vt100-like terminal emulator, and some typical Un*x functions are used, so Windows users will have to use Cygwin, or do quite a lot of porting work.

I cleaned up the code a little, improved the fake timings a lot (interpreting moves to the first line helps a lot), added a search function and fixed the Solaris problem with termios (you'll still need to provide err(3) yourself, though).

To remove the timings from ttyrec files (e.g. to play them back with playnethack2.c or to run one of the other programs here), run this program removettyrectimings.c (last modified 2004-02-08) first. It readsfrom stdin and writes to stdout, so do something like ./removettyrectimings <game.ttyrec >game.raw; ./playnethack2 game.raw since playnethack2 will not read from a pipe.

The following program can help if your nethack doesn't have the dump patch. It removes ANSI control sequences from a file (e.g. a recording from script(1) or from the /dev/null NetHack tournament). This gives better results, requiring less manual editing, than strings(1). Download stripansi.c (last modified 2004-02-14). For example, a ttyrec file mightbe massaged with ./removettyrectimings <file.ttyrec | ./stripansi | sed -e '/^--More--$/d' >dump (all on a single line). The main cruft left is the map. It may also be useful in recovering from mind flayer attacks; although some people consider this cheating, I don't -- you could just have remembered or written down the object kinds.

Both removettyrectimings.c and stripansi.c should be well portable.

This program timettyrec.c (last modified 2004-04-04) shows an estimate of the realtime e.g. spent playing the game, of a ttyrec file. This is done by summing the difference between the times of the events with a maximum of ten seconds. It reads from stdin. Example bzcat *.ttyrec.bz2 | ./timettyrec. The program is not particularly portable, it should work on *BSD and Linux but does not work on Solaris.

Nethack spoilers

Shop price spoiler and the script used to generate it (last modified 2004-04-17). Columns are as follows: base isbase price, numbers are buying prices depending on charisma, selling are selling prices, scredit are the amounts of credit the shopkeeper will offer if he has no gold. The "sur" and "sub" columns list the less favorable price offered 25% of the time for unidentified objects while the "." columns list the standard prices. For Tourists and other "suckers" run the script with the -t option. For more details, see other spoilers such as this NetHack Shopping Spoiler, or this NetHack Object Identification Spoiler.

Nethack menucolors patch

A version of the menucolors patch which optionally uses POSIX regcomp(), regexec() instead of GNU-specific regex functions. Download (last modified 2004-04-20). This isuseful for systems like *BSD, Solaris, DJGPP. (*BSD usually has gnuregex but it's more work with compile options). The current version uses extended regexps which is perhaps not the right thing (e.g. unquoted parentheses are special). Also note the patch was created against nethack 3.4.3 with the FreeBSD Ports Collection's patches, this may result in some wrong line numbers.

Back to Jilles' homepage

This page last modified: 2009-05-08

Created with Vim - Powered by FreeBSD - Valid HTML 4.01!