Live data from Hacker News

BrowserHack: NetHack ported to the web

coolwanglu.github.io

1–10 of 28 posts

Re: BrowserHack: NetHack ported to the web

#4
This is fucking nuts!

All of the game code is Nethack's original C: https://github.com/coolwanglu/BrowserHack/tree/master/src

Porting is mainly accomplished by defining a windowing system for 'web' (mostly in C), right next to the definitions for 'X11', 'Qt', etc: https://github.com/coolwanglu/BrowserHack/tree/master/win

And compiling through LLVM via Emscripten, resulting in a browser-runnable JS target: https://github.com/coolwanglu/BrowserHack/tree/gh-pages.

Absolutely incredible work all around.

----

That said, fuck tilesets. ASCII graphics master race.

Re: BrowserHack: NetHack ported to the web

#6
post #3

For people new to NetHack: You can play NetHack just by running telnet nethack.alt.org And you can save games and resume them from another computer, as well as watch other people play!

Watching complete strangers nethack is weird, because it's a completely noninteractive medium.

Re: BrowserHack: NetHack ported to the web

#7
post #6
post #3

For people new to NetHack: You can play NetHack just by running telnet nethack.alt.org And you can save games and resume them from another computer, as well as watch other people play!

Watching complete strangers nethack is weird, because it's a completely noninteractive medium.

You can send them messages via the mail daemon :)

Re: BrowserHack: NetHack ported to the web

#8
I'm extremely impressed, although as someone who learned NetHack without tilesets, it's hard for me to imagine wanting to play a multihour game with tilesets. (Maybe a funny hack would be to create an ASCII tileset that recreates the appearance of a character-mode display?)

And it's very hard for me to know at a glance what monsters are, but that's presumably just a matter of experience (I immediately know what particular-colored versions of particular letters are, but I haven't learned their equivalents in any tileset by heart).

Also, not being able to see the whole dungeon at once sort of loses information that NetHack users have traditionally (maybe unfortunately) had access to in character mode: if you can see the whole dungeon inside an 80x24 screen, you know in which directions it's worthwhile to search for additional passageways and rooms that you haven't discovered yet (because they have to be in directions that would fit on screen!). In tileset mode with a partial screen view, you don't really know where you are relative to the corners of the dungeon level, so you don't immediately know whether it's worthwhile to search or dig in a particular direction.

A couple of minor practical problems with the interface for me: it didn't recognize Esc (for example, when prompted to choose a direction for the / command), and unambiguous # commands such as #untrap and #pray weren't autocompleted. It's possible to work around the former problem by pressing any non-direction key. For reasons that aren't obvious to me, pressing any arrow key while on top of either an up or down staircase will result in taking the staircase.

I should say again that getting NetHack to run in the browser is a really impressive achievement.

Re: BrowserHack: NetHack ported to the web

#9
I made a web browser playable Rogue-like about 7 years ago.

It was the first incarnation of my Dead By Zombie game. Python and a completely homegrown engine. I later decided the hack novelty of it didn't outweigh the negatives of the inferior latency and increased complexity. So I dropped support for the web UI and rewrote it to have a conventional curses-based UI for play in a terminal. No regrets.

Post reply on HN