Main Page | Info | Downloads | Screenshots | Developers | Misc

How did this get started? Edit

This project began almost accidently. I had discovered that there was a version of PDCurses that used SDL as a backend. In other words, a terminal library that didn't use a terminal at all! Intrigued by this, and knowing that the TTY version of NetHack used Ncurses on Linux at least, I tried to compile the tty version using PDCurses-SDL instead of Ncurses.

This didn't work at all. It seems that NetHack only uses the low-level screen manipulation routines rather than the high-level curses functions, whereas PDCurses only uses the high-level functions. Next, I thought I would try to modify the tty interface to use the high-level routines, but this proved to be more difficult than I imagined.

Finally I decided to start from scratch, and try making a new windowport using the high-level curses routines with the goal of making a "tty" version of NetHack that I could link against PDCurses for SDL, and therefore be completely terminal-independent, and behave the same on all platforms - even ones that don't have an underlying terminal at all, such as PDAs.

The documentation is pretty good (window.doc in the /doc directory of the NetHack source tree), and helped me get started. Also helpful was looking at the source for the other windowports. I tried not to look at the tty code too much so that I would be creating something that was different, so I would first look at e.g. the Gnome or win32 ports to see how certain functions were implemented.

Writing a windowport is a lot of work, but way more fun than it sounds. It's fun to get it working for the first time, then add things bit by bit. As I added more, I could do more in the games, and "testing" became more fun. Unfortunately, I lost a few promising games to development bugs!

My main philosophy while developing this windowport was that while I was creating a character-based interface like the tty version, I wasn't limiting myself to the assumptions that the latter make, such as terminal size, window placement, etc. In particular, I wanted to be able to make use of larger terminal windows in order to have a multi-line message window, as well as being able to optionally draw borders around the windows for asthetic purposes.

I also looked at some of the options available in other windowports, but not in the tty version, and implmented many of them, such as window positioning and dialog-related options.

Although my main interest when I started this project was using the terminal-independant cross-platform PDCurses for SDL library, I made sure that the code was also compatible with Ncurses. Once I released the first version of the code, I quickly discovered that people were much more interested in the Ncurses version, likely due to the potential for remote play.

Anyway, that's how I got started with this project. There is also a personal story that goes with this.

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.