Nethack 5.0 has been released

@Play‘ is a frequently-appearing column which discusses the history, present, and future of the roguelike dungeon exploring genre.

So yesterday the Devteam (it is always the Devteam) released version 5.0 of legendary and venerable rogueike compuer game NetHack. It is 39 years old.

Nethack (I am more used to writing it without the capital H) is a venerable roguelike computer game, and by some measures the greatest roguelike of them all. Long before Caves of Qud or Dwarf Fortress it was, and still is, a game of surprising depth, and for many years no other games were anything close to it. Even today, few games do.

Level 1 of the Dungeons of Doom

The history of the game is recounted on the excellent Nethack Wiki. It got its start as a remake of Jay Fenalson’s Hack (1981), itself a recreation of Rogue (1980), and which was remade by Andries Brouwer (1984). The first version of Nethack, sometimes stylized ad”NetHack” was 1.3d, posted to Usenet by DevTeam leader Mike Stephenson in June 1987.

Nethack 3.0 (July 1989) saw major changes to the gameplay. Nethack 3.1 (January 1993) greatly changed the dungeon, and in large part all following versions are modifications and elaborations upon it. In the time since sometimes there have been great pauses in its history. Nethack 3.2 arrived April 1996; Nethack 3.3 in 1999; Nethack 3.4 in 2002; Nethack 3.5 in 2002; Nethack 3.6 in December 2015; and now, Nethack 5.0 on May 2, 2026.

Level 5 of the Dungeons of Doom

Here is a list of major changes, though it contains significant spoilers, and a note tells us that this is a renamed changelist from 3.7. With 3.4 the Devteam switched to a Linux-style numbering system: even minor numbers (like 3.6 and 5.0) are releases for wide play, and odd minor numbers (like 3.5 and 3.7) are development versions mostly intended for work and bug testing. Even so, as with all major versions of Nethack, bugs almost certainly exist in this version. Nethack jumped past version 4.0 probably because a notable fork called itself Nethack 4.

Three major architectural changes made in this version: the code now supports C99, bringing its source to the cusp of the 21 century. Much better support for cross-compiling exists now, building it on a system it’s not intended to run on. And the old yacc/lex special level construction system has been replaced with Lua. This make Lua a build requirement.

Exploring the Gnomish Mines

So, how do you play it?

For three systems binaries are provided: Windows, MS-DOS and Amiga. Yes, Nethack still supports MS-DOS, and yes, it still supports classic Amiga: it explicitly supports AmigaDOS 3.0, meaning it can still run on 68000 machines. While Atari ST support isn’t explicitly claimed, plenty of references to it are left in the code. (Does Lua exist for ST?)

That these are the only systems they provide binaries for shouldn’t be seen as an indication that these are the “most important” platforms for Nethack, it’s more that, since it’s entirely open source, building it yourself is entirely possible, and more expected than with most software. Nethack can be built for Linux, Windows 8-11, AmigaDOS, MacOS (I’m not sure if this includes classic Mac too but it might), Windows CE (wow), OS/2 (additional wow), BeOS, VMS and multiple Unixes.

The town in the Gnomish Mines

Linux poses a special challenge for releasing binaries since there are so many distributions, so until 5.0 becomes the main Nethack in their repositories you’ll probably have to built it yourself. I have done this on two systems and can vouch that it’s doable, make sure to read the directions carefully though. After reading the README in the top level of the gzip tarball, the file you want to follow is in sys/unix/NewInstall.unx, which will tell you the manner in which to invoke sys/unix/hints/linux.500, and then ultimately, again from the top level of the source, make fetch-lua, make all, then make install. I ended up with a directory in my home called nh/install/games/, which contains a script that starts the system-installed nethack. Note that nethack supports multiple play styles: ordinary tty, curses, Windows UI, X11, Qt, Gnome and more, and configuring any of those besides the standard game will mean you’ll have to find an option to enable in include/config.h.

Another option is to play through public Nethack servers. The most popular of these are probably alt.org and Hardfought. alt.org doesn’t seem to make 5.0 itself available yet, and I’ve been able to get through to Hardfought today via ssh (possibly due to a misconfiguration on my end). If you can set them up for play then not only do you not have to build or install the game yourself, but you can even play with public bones, the remnants of other players’ games, adding an additional layer of high-stakes randomness to the dungeon.

A shop on level 2

For New Players

I wish I could point you to my old @Play column on learning Nethack, but its home blog GameSetWatch has been gone from the living internet for four or five years now. My book Exploring Roguelike Games from CRC Press has it, but it’s quite expensive unfortunately. It’s still buried somewhere in the Internet Archive. I must hunt it down some day.

If you haven’t played Nethack before you are in for a bit of a learning curve. Nethack 5.0 now has an optional tutorial in the early phases of the game that might help you. You can always press ? during the game to find its help system. If your keyboard has a numpad you’ll really want to enable it, or else you’ll have to learn vi keys, hjkl, for movement, as well as yubn for diagonals. This will also push several important commands into the “extended” input system, where you either hold Alt (aka Meta) and press a letter, of if you don’t even have that, you press “octothorpe” (#) and then type a command name. This is especially annoying for the #kick (Alt-K) and #loot (Alt-L I think) commands, needed for opening locked doors and chests, and getting items out of chests. You can set options during the game with #option (Alt-O), or in .nethackrc, defaults.nh, or NetHack.cnf, depending on your platform.

A statue garden on Level 2

I can’t impress enough how much fun Nethack still is, even after all this time. There is a ton to learn before you can play well (read the wiki if you don’t mind spoilers), but it’s mostly entertaining knowledge. What other computer game freely quotes from sources ranging from Edmund Spenser to Terry Pratchett? It plays much faster than roguelikes of more recent vintage. Every level is only one screen in size, characters advance through the early levels rapidly, and its monsters and item systems are still top class. It’s true that I do miss the days when they’d introduce huge new features (3.0 and 3.1 each made it into almost an entirely new game), but there’s still a lot of things to discover. Gehennom, the deeper areas of the dungeon, has been changed greatly, and I look forward to reaching those hellish climes once again.

Happy hacking!

Leave a Reply

Your email address will not be published. Required fields are marked *