|
Progress report on long-term plan My long-term plan, at present, is to take a longish break from writing free software and to relax and do nothing much. I am here to report that in the past week I have written one (1) new piece of free software, and thus my progress on the long-term plan is actually negative. In pursuit of the general idea of doing nothing much, xanna helpfully suggested last week that now might be a good time to take up NetHack again. I periodically attempt not to suck at it, but with little success so far. This time it occurred to me that what I could really do with was to watch a couple of games being played by more competent people, just so I could get a general idea of what kinds of things they were doing differently from me but without completely spoiling the fun of working out for myself when it was a good idea to do what. alt.org contains a large number of ttyrec recordings of NetHack games, many of which ended in ascension and can therefore be safely assumed to be performed by far better players than me. So I downloaded a couple of these plus a player application, and got about half way through watching one before completely losing my temper with the fact that the player didn't permit me to rewind when something interesting flashed up on the screen and I didn't manage to press Pause fast enough. The trouble is that ttyrecs are fundamentally not designed for easy random access; the normal player application simply alternates between sleep(2) and write(2), with only minor changes to support speed adjustment and pausing. In order to support rewinding, you'd have to actually run the entire file through a terminal emulator and read off the resulting screen states in such a way as to be able to randomly access them thereafter. This involves considerably more high technology than the average programmer is conveniently able to get their hands on, so it's not surprising that it hadn't already been done; but fortunately I was the right person for the job, since I just happen to have sufficiently intimate knowledge of a piece of terminal emulation software to be able to adapt it quickly into this sort of application, and also a sufficiently good feel for random-access data structures to be able to store the resulting data reasonably efficiently. So, in only a couple of hours, my new ttyrec player sputtered into life, and within the first ten minutes of use it had more than paid off the coding time in lack of massive annoyance. It's at about this point that my conscience reasserted itself and pointed out that I was doing a very bad job of not writing software. So I've left the job half-finished: the current state of the program is that it works provided you build it against ncurses on Linux, but completely lacks a sensible build system and portability framework to adapt it to other Unices and/or curses implementations. Therefore, I'm kind of hoping someone else will send me some patches that do things with autoconf, ‘make install’ and other such amenities. To say nothing of a few more configurable options and features, and definitely some documentation as well. Still, on the plus side, my NetHack has definitely improved. Last week I got a couple of characters all the way down to the bottom of the Gnomish Mines and back up in one piece, and although both of them subsequently died avoidably, I'm certainly playing better NetHack right now than I ever have before. |