UnNetHack enters the Age of Unicode – Part Two (UTF8graphics)

UnNetHack has a new option “UTF8graphics” for outputting UTF-8 encoded characters onto the terminal. Currently only dungeon features (walls, fountains, altars, etc.) are supported although I think it shouldn’t be too difficult to extend this to all things that are displayed on the map.

Example map with UTF8graphics (the other 3 maps from Part One: ASCII, IBMgraphics and DECgraphics)

Here is a list of the dungeon features that are enhanced in UTF8graphics:

Altar:      Ω
Grave:      †
Tree:       Ψ
Iron bars:  Π
Open doors: 
Ladder up/down: ≤ ≥

The floor and the walls use the usual line drawing characters already familiar to the players from IBMgraphics and DECgraphics.

Sinks and thrones currently lack Unicode characters but ideas for those and for general improvements is of course welcome.

I didn’t bother to update the Rogue level characters. That level will still only appear in simple ASCII (after seeing what they had to do with IBMgraphics to make it look different, I rather postponed doing that for UTF8graphics yet).

For monsters there’s already the interesting work Ray Chason did a while back: Unicode map revisited: Proposed monster accents. I will certainly consider this when changing the monster characters from ASCII to Unicode.

But be aware that the current implementation is restricted to single code points. That means no combining characters or other fancy Unicode feature are possible at the moment.

For a fully enabled UTF-8 UnNetHack there is still a lot to do (don’t expect a release date soon). For example the whole text handling would have to be checked or also the GRAPHICS option would need to be rewritten to allow the user to specify Unicode code points. Currently the users have to be content with the hard coded defaults.

As usual this feature is already available on the public server and will be part of the next release of UnNetHack.

Update 04 Feb 2011

The default glyphs for lava(), water() and iron bars() have been changed.

The UTF8graphics glyphs are now customizable in the config file, by specifying the name from the / command and the Unicode codepoint in decimal or hexadecimal notation:

SYMBOL='opulent throne':u+2644 # astronomical symbol for Saturn
SYMBOL='fountain':0x2648 # astronomical symbol for Aries
SYMBOL='molten lava':9671 # white diamond

~ by bhaak on 25. January 2011.

4 Responses to “UnNetHack enters the Age of Unicode – Part Two (UTF8graphics)”

  1. This is very cool! I’ve always enjoyed playing NetHack with funky text glyphs (as opposed to tiles, which I don’t like). I am anxious to see how it will look with the monster accents, if you decide to go that route as well!

  2. […] UTF8graphics on map and in HTML dumps […]

  3. Not working for me, when I enable UTF8Graphics it fails to position the glyphs on the screen properly, and they do not look like the proper glyphs.

    Overall, need more documentation on your new defaults.nh options in this fork.

    • “defaults.nh” sounds like you’re on a Windows OS. On Windows 7 it doesn’t even show any characters at all for me. I would have been surprised if it worked on the Windows Console.

      I probably should disable UTF8graphics on Windows all together.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: