LinuxDevCenter.com

oreilly.comSafari Books Online.Conferences.
Sign In/My Account | View Cart   

We've expanded our Linux news coverage and improved our search! Search for all things Linux across O'Reilly!

Search
Search Tips

advertisement


Listen Print Discuss Subscribe to Linux Subscribe to Newsletters

Slash'EM: The Sum of All NetHacks

by Howard Wen
06/12/2003

NetHack's family tree is big. This free, open source dungeon exploration game has been around for so long (16 years and counting) that it's spawned many unofficial variants, including patches and graphical front-ends ("window interfaces"). Over the years, NetHack fans with programming savvy, impatient for the next release, have implemented their own ideas to improve or enhance the game. Most of these variants have a legacy in Slash'EM--all branches in the NetHack tree eventually lead to it.

Slash'EM most noticeably extends the simple glyphs that NetHack uses for its graphics with several more attractive tilesets. But the real difference between it and many NetHack window interfaces lies beneath such superficialities. Slash'EM alters the original's game play, while most other window interfaces, like AllegroHack and Falcon's Eye, do not change the fundamental way that NetHack plays.

The added gaming elements that Slash'EM adds to NetHack include:

  • New dungeon levels containing new challenges.
  • A longer main dungeon and a much shorter Gehennom. (This addresses the frequent complaint that Gehennom is too long and boring.)
  • Several new races and roles. (Some, like the drow, are easier; others, such as vampires, are much harder.)
  • Numerous new monsters, items and artifacts.
  • Items can be invisible.
  • Polymorphed monsters and items revert after a short delay.
  • Shopkeeper services allow you to pay to have your equipment assessed or improved.

Related Articles:

Jaakko Peltonen on Falcon's Eye -- Falcon's Eye, an impressive graphical front-end to the venerable text-only Nethack is a milestone in open source gaming. In this interview, Howard Wen talks with Jaakko Peltonen, creator of Falcon's Eye, about the technical and social issues the project has faced.

Falcon's Eye: The Making-Over of Nethack -- Few games have the staying power of Nethack, yet its interface hasn't strayed from its roguelike roots. Enter Jaakko Peltonen's Falcon's Eye. Gaming author Howard Wen explores the new clothes on a classic game.

Mashing-Up Two NetHack Variants

Slash'EM's origins trace back to 1997 when Warren Cheung first merged a variant of NetHack, called Slash, with another patch for the game called the Wizard Patch. The current Slash'EM development team came together in 2001. Its goal has been to continue Slash'EM's legacy of maintaining its interdependence with NetHack. They make it a point to incorporate new versions of NetHack into Slash'EM, working with the NetHack developers to integrate improvements they themselves have made to NetHack.

Slash'EM is written in C, with its Qt windowing interface in C++. Of course, because of its NetHack lineage, the current release contains lots of code which the present team did not develop originally. Normally, incorporating code from outside a project can be a problem due to incompatibilities among various open source licenses, but things work differently within the NetHack family. J. Ali Harlow, 36, a programmer for the Applied Vision Research Centre of City University in London, England and one of the current maintainers of Slash'EM, says, "There's no such problem with code that has been written to be used with NetHack. We seek to use the best of these whenever possible."

Cheung, 23, today works as a Computer Science research assistant at the University of British Columbia in Vancouver, British Columbia. He says that the hardest technical challenge that he surmounted in creating Slash'EM was the very first one: combining the Slash variant and Wizard Patch together. At that point he had no knowledge of C and had never compiled anything before. His first attempt at merging the two failed. About a year went by before he gave the idea another shot and, that time, he got it to work. Slash'EM was born. "Whenever I'm writing any code that doesn't work," reflects Cheung, "I just think back to that and tell myself, 'If I could make Slash'EM work without knowing anything about programming C, I can at least do this.'"

Fine-Tuning the Proxy Window Interface

One of the continuing technical challenges has been perfecting Slash'EM's proxy window interface. The concept of a proxy window interface is relatively simple: the game runs as one process and the window interface runs as another, separate process. They may perhaps even run on different machines. But they need to talk to each other using a mutually-understood protocol.

Harlow has been been working on this element for well over a year now. The first major challenge has been to design a protocol which is independent of machine architecture and doesn't require much overhead. Harlow settled on RFC 1014. He says, "I'm still working on fine-tuning the protocol to reduce overhead. One obvious improvement would be to move to an asynchronous protocol, rather than the current, simple synchronous protocol."

The next challenge for him deals with the fact that all existing window interfaces have been part of the main process, and so they have had access to the variables and functions of the game. NetHack has a well-defined API for use when the game calls window interfaces, but very little in the way of an API for the window interface to use when querying the game. The remedy for this has had to be designed from scratch.

"The process is complicated by the fact that we need to be flexible enough that future window interfaces will have everything they need, but not so flexible that an external window interface could be used to cheat when playing with an official binary," says Harlow. "I believe I have achieved the latter, but I'm still a long way off achieving the former."

NetHack, the Vampire Player

The next release of Slash'EM (code-named "Vampire") has been in development for almost two years. (The Slash'EM project team is hoping to release the first beta early this year.) Some of the new features include:

  • In prior Slash'EM releases, vampires had no way of storing food. Potions of blood will allow them a limited ability to do this, which will reduce the potential for deaths that are not the player's fault.
  • An integration of the Lethe Patch for NetHack, which introduces the River of Oblivion and monsters from the Cthulhu mythos that include deep ones, shoggoths, and Cthulhu himself.
  • A new Gtk+ window interface based on Gtk+ 2.0. In addition to taking advantage of the new features offered by Gtk+ 2.0, the interface has also been redesigned to reduce flicker and run much faster.
  • The current release of Slash'EM has three aligned quests ("law", "neutral" and "chaos"), each containing an aligned key. It has always been the intention for Slash'EM that the player would need two of the three to complete the game. Slash'EM Vampire will make this the case by redesigning the top level of Vlad the Impaler's tower to contain doors that can only be opened using the aligned keys.
  • Built upon the most current NetHack codebase. Slash'EM Vampire will be based on 3.4.

An Amazingly Complex Program

Advising those who want to develop yet another flavor of NetHack or interface to add to the game's family, Harlow suggests, "Whatever you decide to do, make sure that you're doing it because you enjoy it and not just because you think it should be done. Try and understand how long it is going to take you to do what you're planning, and decide if you can really afford the time. There's nothing more soul-destroying than a half-completed job."

Ironically, Cheung would not recommend that others attempt what he did, which was to begin by looking at the NetHack source code without prior knowledge of C. Things will be much easier if you're not trying to both figure out the programming language and what the program is doing--this might be obvious but he thinks it's worth emphasizing.

"Start with a small modification, then work out all the ramifications," says Cheung. "It's amazing how everything in NetHack can interact, and the player can do almost any action with any object. So one simple addition can lead to many more ideas that are interconnected. NetHack is an amazingly complex program, and small changes can have far-reaching, unexpected effects."

Although he himself has much less time now to work on the project he started, Cheung is amazed that Slash'EM continues going so strongly in the open source gaming community without his regular involvement and by how it's affected him personally: "My long history with Slash'EM has led to it becoming part of how I think. Whenever I'm playing a new game or watching a movie, one of the thoughts that will invariably cross my mind is, 'This would make a neat addition to Slash'EM.'"

Howard Wen is a freelance writer who has contributed frequently to O'Reilly Network and written for Salon.com, Playboy.com, and Wired, among others.


Return to the Linux DevCenter.


Mmm, Lethe patch... What's your favorite variant feature?
You must be logged in to the O'Reilly Network to post a talkback.
Post Comment
Full Threads Oldest First

Showing messages 1 through 3 of 3.

  • after NetHack gets boring, try SlashEM
    2003-08-22 04:33:06  anonymous2 [Reply | View]

    I played NetHack on and off since about 1990, but eventually got bored after winning ("ascending") so often. Just then there came out Slash and shortly afterwards SlashEM, which I play until today, because the SlashEM team (most notably J. Ali Harlow) adds new features, fixes bugs and merges the great Lethe patch in it. SlashEM is a great game, and I hope the development won't ever stop, because then, I will again get bored of the game and wander off to other (roguelike) games... ;)

    I.
  • after NetHack gets boring, try SlashEM
    2003-08-22 04:32:47  anonymous2 [Reply | View]

    I played NetHack on and off since about 1990, but eventually got bored after winning ("ascending") so often. Just then there came out Slash and shortly afterwards SlashEM, which I play until today, because the SlashEM team (most notably J. Ali Harlow) adds new features, fixes bugs and merges the great Lethe patch in it. SlashEM is a great game, and I hope the development won't ever stop, because then, I will again get bored of the game and wander off to other (roguelike) games... ;)

    I.
  • Another "rogue-like" game
    2003-06-13 03:34:08  anonymous2 [Reply | View]

    Angband.
    http://www.thangorodrim.net/

    I've know NetHack for about three years, but now I'm loosing too much time with Angband, wich in this time of "The Lord of The Rings" films seems to be enjoyed by a lot of people around me, after all they know much of the bad guys.

    I'm always impressed by how so "simple" games - especially in graphics, can have fans. And of course, they are much better than this 3D games of point and run and kill games...


Tagged Articles

Be the first to post this article to del.icio.us

Sponsored Resources

  • Inside Lightroom
Advertisement
O'Reilly Media
© 2008, O'Reilly Media, Inc.
(707) 827-7000 / (800) 998-9938
All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.
About O'Reilly
Privacy Policy
Contacts
Authors
Press Room
Jobs
User Groups
Academic Solutions
Newsletters
Writing for O'Reilly
RSS Feeds
Other O'Reilly Sites
O'Reilly Radar
Ignite
Tools of Change for Publishing
Digital Media
Inside iPhone
O'Reilly FYI
makezine.com
craftzine.com
hackszine.com
perl.com
xml.com
Sponsored Sites
Inside Aperture
Inside Lightroom
Inside Port 25
InsideRIA
java.net