Getting Started

From Hugo By Example

Revision as of 08:26, 17 December 2016 by RoodyYogurt (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Welcome! Interested in making a game in Hugo? You’ve come to the right place!


Get the Hugo Book

First things first, you should download and read the Hugo Book. Of course, one doesn’t have to start off knowing everything, but familiarizing yourself with the code logic and having an initial survey of the Hugo manual will help you decide if Hugo is right for you.

Text Editors

Even among most modern interactive fiction systems, Hugo is kind of old school in that it doesn’t have a graphical user interface for writing games. This means that you’ll be using a text editor and a compiler to create the .hex files that Hugo interpreters can play.

Windows (and WINE)

Now, to be honest, the Windows software suite for Hugo does have a frontend that allows compilation without the use of command lines, but I find that a good text editor setup is preferable. For instance, the frontend can be confused if you change the source file you are compiling mid-session. Also, if your compilation has an error, you can’t easily jump to the problematic lines (something almost any text editor with “send output to window” functionality can handle).

For the most part, I recommend that new Hugo Windows users check out my distribution of Notepad++ that comes pre-configured with methods for starting new projects, compilation, and several other niceties.

If you don’t already have Notepad++ installed, I suggest downloading this standalone version. It provides clickable buttons in the toolbar for the aforementioned tasks. One note: one button that looks up selected text in the Hugo Book assumes you have Acrobat Reader installed as that is the only PDF reader I know of that lets you open a document with a search string in its command line. Also, WINE users may find that some buttons look broken (but should remain functional nonetheless).

If you already have Notepad++ installed on your system, download this “add on” package for instructions and files for turning it into a nice Hugo coding environment (the instructions are in the included .pdf file).

If you prefer other text editors, you can look for syntax highlighting solutions here. Of course, you’ll also need the Windows Hugo package and library (both of which are already included in the Notepad++ package).

Other OSs

Linux users should get the Linux binary from the IF Archive, and MacOS X users should build the compiler and such from the files here (as of the writing of this page, it hasn’t yet been uploaded to the IF Archive). You’ll also need the Hugo library. For testing purposes, you may want to also download the Hugor interpreter (available here and through package managers).

You also can look for syntax highlighting files here.

Syntax Highlighting

If you’ve gotten this far and don’t know what syntax highlighting is, well, it’s a text editor extension that gives various elements of the code different colors for easier readability. Of course, it doesn’t actually affect how the code *works* so if you really want to write your game in Notepad, you could do that, too.

Editor without highlighting Editor with highlighting
Nohilite.png Withhilite.png


Roodylib is several years’ worth of Hugo library fixes and improvements added since the last official library release in 2006. While not required, I personally recommend users adopt it.

Sample Game

Now that you should have a text editor and your compiler and what not, download "The Vault of Hugo" and open it up in the text editor. “The Vault of Hugo” is great as it has an example for almost every basic feature Hugo has.

More example code can be found at the IF Archive.

"Shell" file

The “shell” file is the minimum code the compiler needs to create a game (well, a game that acts like you’d expect an IF game to act, I mean). You can download this and make a copy of it each time you’re starting something new (Notepad++ does this automatically for you through its buttons).

Write Your Game

You should now be ready to get started. If you run into trouble, you have the Hugo Book, the example games, and this website (including this page of useful tips) at your disposal. You can also post coding questions at the Jolt Country's Hugo forum or's "other languages" forum. Lastly, if you'd like real-time assistance, there's the #Hugo channel on the ifMUD. You can also send questions to roodyyogurt at

Debug Your Game

The Hugo Debugger is a great way to track down the cause behind why-this-thing-isn’t-working-like-it-should. There’s a bit of a learning curve, but once you’re used to it, it’s indispensable.

Personal tools