ttyrec
From Wikipedia, the free encyclopedia
A NetHack recording being replayed using termrec
ttyrec is a program and/or its file format capable of recording the TTY output of a text-mode program together with timestamps and then replaying it.
It is widely used for example in the NetHack community for storing game replays.
Contents |
[edit] Recorders/players
- original ttyrec[1] (Unix)
- Term::TtyRec[2] (Perl)
- Term::TtyRec::Plus[3] (Perl)
- Tie::Handle::TtyRec[4] (Perl)
- termrec [5] (win32, Unix)
[edit] Playback only
[edit] Technical file format specification
Each chunk consists of a header using 32bit little-endian numbers:
- sec -- seconds, either since the beginning of the recording (0-based) or since the Unix epoch
- usec -- 0..999999 microseconds
- len -- length of the payload
and the actual payload written as text with vt100 control codes.
The format doesn't contain any information about the character set used nor about the terminal size needed to play back the file. termrec will inject this information as \e[G or \e[@ for Unicodeness and as \e[8;Y;Xt for size, but this is a hack outside of the format specification, not guaranteed to work on all terminals.
[edit] Related formats
[edit] References
- ^ http://0xcc.net/ttyrec/
- ^ http://search.cpan.org/dist/Term-TtyRec/
- ^ http://search.cpan.org/dist/Term-TtyRec-Plus/
- ^ http://search.cpan.org/dist/Tie-Handle-TtyRec/
- ^ http://angband.pl/termrec.html
- ^ http://www-masu.ist.osaka-u.ac.jp/~kakugawa/misc/ttyplayer/index-en.shtml
- ^ http://www.chiark.greenend.org.uk/~sgtatham/ipbt/
- ^ http://nh-recorder.sourceforge.net/
[edit] External links
- How to record NetHack games with ttyrec at the Wayback Machine (archived June 18, 2008)