BrowserHack: NetHack ported to the web
coolwanglu.github.io
BrowserHack: NetHack ported to the web
1–10 of 28 posts
Re: BrowserHack: NetHack ported to the web
#2Re: BrowserHack: NetHack ported to the web
#3You 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!Re: BrowserHack: NetHack ported to the web
#4All 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
#5Nethack is how I committed vim keybindings to muscle memory. This is really cool (though a few things, like Ctrl-D to kick and extended commands seem to either not work or be clumsy).
Re: BrowserHack: NetHack ported to the web
#6For 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!
Re: BrowserHack: NetHack ported to the web
#7For 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
#8And 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
#9It 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.
Re: BrowserHack: NetHack ported to the web
#10http://moxielogic.org/blog/nethack-in-your-browser.html
The NetHack C code was cross built to moxie-rtems, which was run in a moxie simulator that was cross built to JS with emscripten.