NetHack Curses Interface Wiki


22pages on
this wiki
Add New Page
Talk0 Share

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

The curses interface has been built on Linux and Windows, and likely could be built on many other platforms that NetHack supports, so long as there is a curses implementation (or SDL in the case of PDCurses-SDL). Below are instructions on compiling from source, as well as tips for platforms that are not yet supported.

Currently Supported Platforms Edit

Linux / Other UNIXes Edit

Follow the instructions in sys/unix/Install.unx. By default, the Makefile is setup to compile with ncurses. Edit Makefile.src if you wish to compile against a different curses library, such as PDCurses for SDL. Curses implementations other than Ncurses and PDCurses will likely work, too, but have not been tested.

Windows Edit

  • Make sure your development environment is setup correctly to compile NetHack. You may want to try building it unmodified before trying to add the patch. The makefile that I provide is for Mingw32, so if you use a different compiler, you will have to edit the appropriate makefile by hand.
  • Download SDL for Windows. Just the base SDL library is needed.
  • Download PDCurses, and compile PDCurses-SDL in the sdl1 subdirectory. The provided makefile assumes you are using Mingw32.
  • Place both libraries (SDL and PDCurses) somewhere where the NetHack build can use them. The makefile I provide is setup to look for the static versions of these libraries in a lib subdirectory under the main nethack directory.
  • Follow the instructions in sys/winnt/Install.nt witht he following exceptions:
    • After running nhsetup, manually copy the file cursmake.gcc to the src/ subdirectory
    • Instead of typing "mingw32-make -f Makefile.gcc install" you will type "mingw32-make -f cursmake.gcc install"

Make sure you are compiling from a standard Windows command prompt and not a UNIX-style shell, or else it will not work!

Mac OS X Edit

If you know how to build NetHack or Slash`EM on OS X, then building with the curses interface should be no problem. OS X uses the UNIX build system, so the appropriate Makefiles have already been modified to build with this interface.

You will need to decide which Curses library to build with. I do not recall if OS X ships with Ncurses or a BSD-derived curses, but I am certain that Ncurses is available. I would recommend using Ncurses over a different system curses library since the former has been tested and the latter has not.

Alternately, you can build with PDCurses for SDL, which is what the binary I provide uses. I believe this to be the most fun option for OS X, removing the terminal dependency, and allowing the use of the IBM extended ASCII characters. Get and install SDL for OS X, and then download PDCurses, and build in the sdl1 subdirectory to build PDCurses-SDL. Place these libraries somewhere where they can be used when linking NetHack (or Slash`EM), and modify the Makefile in the src/ directory to pass the appropriate -L/path/to/these/libraries flag to link them in. Feel free to contact me with any build or Makefile-editing questions.

OS/2 Edit

I resurrected an old OS/2 system, and built NetHack with PDCurses for OS/2 as well as PDCurses for SDL, and both work. I used EMX 0.9d, and dmake. There are newer more current versions of gcc and such for OS/2, but I haven't lookd into them. The current version of the code has a modified makefile for OS/2 that can be used to build the curses interface.

DOS Edit

I have built a DOS version of the curses interface via DJGPP, and PDCurses. The current version of the curses interface modifies Makefile.GCC to support building on DOS.

Not Yet Supported Platforms Edit

Mac OS Classic Edit

There probably isn't much interest in porting to this platform, but perhaps some people may have old Macs incapable of running OS X, and want a nice text-style interface.

Mac OS Classic does not have a command-line interface, so, as far as I know, at least, no curses implementation exists. However, since a port of SDL exists, it is theoretically possible that PDCurses for SDL could be compiled on such a system, allowing NetHack with the curses interface to be built as well. Such an endeavor would likely take a lot of work and Makefile-hacking. I'd be interested in hearing if anyone were to attempt it.

IOS / Android Edit

I am intrigued by the idea of doing a handheld OS port. This should be possible via PDCurses for SDL, removing the terminal dependancy. I have not looked into this closely thus far, however.

Fixes Edit

No rays or ray animations Edit

Since the author is not responding to emails since 2012, here are 2 very important fixes to the SLASH'EM interface (I believe these problems don't exist in the Nethack interface).

To fix rays and ray animations not being shown find this part in `se007E7F3-curses-a4.patch`:

+void curses_delay_output()
+/*    curses_refresh_nethack_windows();
+    usleep(5000); */

And change it to:

+void curses_delay_output()
+    napms(50);

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.