As I mentioned earlier, Nethack4 is an active variant of Nethack which currently only works online or on Linux. Several months ago I posted a “how to compile Nethack4” article on my main blog, but not here. Then the developer needed to change the way it compiles which made my instructions obsolete. I figure it’s time to have an article showing you how to compile and play the game here, on my Nethack blog.
Nethack4 seems to be the closest fork to vanilla Nethack at this time – there are no new roles or races added, and I think the dungeon layout has not been changed. The reason you’d want to play it instead of regular Nethack is that the interface has been greatly improved and some easy typo deaths now warn you first (the options file lets you disable these warnings).
The homepage for Nethack4 is located here. You will want to download the current copy of the source file from here. Click on the “downloads” button on the upper right, to the left of the “clone” button (don’t worry about that button).
Unpack the .tgz file you just got (it should be 1.7 MB in size before unpacking), and you’ll have a new directory named “nitrohack-ais523”. (Nitrohack was an older fork of Nethack, now obsolete due to some game-breaking bugs. The developer stopped maintaining it.)
Before you can compile Nethack4, you’ll need to install a number of files that it needs. The README file inside of the new directory lists most of them, but currently you need a couple of others.
On a Debian, Ubuntu, Mint, or similar system the files you need to install are:
– build-essential
– flex
– bison
– libjansson4
– zlib1g-dev
and if you want a working server, also install
– postgresql-server-dev-all
– postgresql-contrib-9.1 (to get “pgcrypto”)
Once you have all the files you need, open a terminal and cd into the nitrohack-ais523 directory. From there, issue the following commands:
mkdir build
cd build
../aimake -i ~/nethack4 .. #spaces are crucial in this command
This will create a new directory in your home folder called “nethack4” and compile and install a local copy of the game. It only makes a copy for the current user, but if you really want to make a system-wide copy available for everyone who uses your Linux system, the README will tell you how you can do that.
If you are using Windows, Nethack4 does (technically) compile and run, but the README indicates that, practically speaking, it’s so slow that you can’t play it. What I would personally recommend for Windows users is to play online. You can play online via connecting to nethack4.org via telnet or ssh (username “nethack”, password “nethack”).
Playing Nethack4
I tend to maximize the terminal to fill the screen. This makes the game easier to read. (Nethack4 currently has no option to use tiles).
The main menu will let you choose the following options:
n – start a new game. If you choose to let the game pick your race, gender, and role, you are shown the result before being asked to name the character. For someone like myself, who likes to pick names related to either the race or role, this is one of the many small improvements over vanilla Nethack.
l – load a saved game. Vanilla Nethack does let you keep several active characters at once and pick one each time you begin a game, but the way it’s done here is just more convenient. When you save a game, you are asked to either save, abandon the character, or cancel and keep playing.
v – view a character’s moves, one turn at a time. It defaults to the list of dead characters, but if you don’t have any you can view one of your currently active ones instead.
o – set options. A slightly more convenient way to toggle all the myriad of options in Nethack. This file persists between games.
s – to look at your current scores list (only completed characters – dead or ascended – will be shown).
c – connect to a server.
q – to quit the game.