Hugo online interpreter and story file parser

I’ve made an online interpreter for Hugo. It’s at and some more info in this blog post.

Right now you can only play games that I’ve pre-compiled for the interpreter, so if you have something you absolutely want to see in the library feel free to suggest it. Later I’ll add a feature to upload your own story files or pull them from the Internet. Also note that save games aren’t persistent yet, i.e. they’ll disappear when you close the page.

In addition I’ve made a tool to extract data from Hugo .hex story files. It’s at It can show things like the dictionary, grammar, objects and lots of other things, basically everything that’s stored in the story files. Useful for Hugo techies and when you’re stuck in a game and want a “hint”. It works with games compiled with Hugo version 3.1 (the latest), but the interpreter works with all versions.

As no one has responded – thanks! This looks like, well, it’s a scary way to get the job done but it gets the job done. :slight_smile:

(Your web server isn’t reachable right now, but my web cache says: “a JavaScript version of DOSbox running the DOS version of the text-only Hugo interpreter.”)

Thanks. The server was down due to technical problems an hour or two but seems to work now. Yes, it’s an interpreter on an emulator on another interpreter and the stack goes down as far as the eye can see, but I’m working on a more robust solution so hopefully that’ll be a bit cleaner!

It’s turtles all the way down!

(for Pratchett fans)

That used to be my whole computer there. And now it’s running in a window of a web browser.

That always amazes me. Hopefully it’s possible to provide a datafile as a URL parameter that can be mounted as a DOS drive? That way one would be a able to load external games.

And you don’t even have to make a boot disk to run your favorite games, ha.

Anyhow, this is super cool!

This will be very useful. Thanks for working on this.

Asking as someone who has designed/implemented in Hugo a little bit without being a serious developer, what’s involved in compiling a compatible .hex file?

I think I’m getting the same error zarf mentioned. I see “Exception thrown, see JavaScript console” and a DOSBox terminal showing the commands SET BLASTER=A220 I7 D1 H5 T6/MOUNT C “.”/C:/CALL HUGO.BAT

And the output of the JavaScript console:

pre-main prep time: 3629 msclock.html:122 Module.printErr dosbox.js:1 Uncaught SimulateInfiniteLoop

Oh, just a guess – maybe part of getting a Hugo game ready for this interpreter stack involves rigging the batch file?

Sorry, where are you getting this? With all the games in the interpreter site? Which browser are you using?

The system that runs Dosbox needs to load all files in one resource file. Compiling a game involves taking all files (the interpreter, the game file and some misc stuff) and bundling them up. Hugo.bat is needed to call the interpreter with parameters so that it loads the game file.

Paul, if you’re asking if the author has to put any special code in the game file, no, it’ll play most games just fine, although games with multimedia don’t work well.

It was Chrome running on Windows. I got the same result a few minutes ago with at least two or three games in the same browser, but I was surprised to find that Clock actually worked. Then my browser crashed (slow laptop, not the interpreter, I’m sure).

Sorry, this is a terrible test – even more so because I also tried the interpreter on Chromium running on Linux last night on my desktop PC, and it worked! I want to go through every game in your library on every browser that I have installed on both operating systems, but I don’t have any time right now. Maybe I can do the test tomorrow.

Excellent – Roodylib helps degrade for the DOS layer too, if I remember. I would be pleased to see Waiting running in the browser.

The more robust solution mentioned earlier is now done. In collaboration with Robb Sherwin, we present HugoJS at – a full JavaScript Hugo interpreter. There’s a gallery of titles on the front page, or you can run any .hex file on the Internet just like with Parchment.

Very nice.

this is great. i tried with 2 versions of “A Crimson Spring”: … urgdos.hex [“no graphics or sound” - works fine!] … courge.hex [“original competition entry” - just get a black screen]

is there a reason the second one doesn’t work?

The graphical versions of “A Crimson Spring” start out with a title screen, and the web interpreter currently has a bug where waiting for a keypress doesn’t work (the bug was actually introduced by some newer code so hopefully its fix is just around the corner).

Both versions work for me if you click or press a key when you get the black screen. There are two ways to wait for a keypress in Hugo, and the bug is related to the less common one.

Ok, I’ve fixed the wait-for-key bug so if a game doesn’t work it’s because of something else (let me know!) You might need to clear browser cache to get the latest version of the interpreter if you’ve tried it before.

The source code is also now public at If you want to download and host the interpreter on your own web page instead of using the public interpreter, the instructions for that are here: