Getting Started

Interested in checking out Hugo but don’t know where to start? Hopefully, this page can help!

Get a text editor

If you’re new to coding, you’ll find that having a nice text editor with syntax coloring will go a long ways towards making code easier to understand. Download a program here (gedit, EditPlus, and Notepad++ are some good ones) and install the accompanying syntax file. If you need to configure the syntax file within the program, be sure to associate it with .h, .g, and .hug files.

Editor without highlighting:

Editor without highlighting

Editor with highlighting:

Editor with highlighting

Look at a sample game

Now that you have a text editor fit for Hugo source code, download The Vault of Hugo and open it up with that aforementioned editor. The Vault of Hugo, while written for Hugo 2.5, is still current enough to be a good representation of Hugo code, and it utilizes more of Hugo’s features than the average game. There’s a lot going on there, so if it seems too complicated, don’t worry.

You can also see the code to several other example games at the IF Archive.

Get the “shell” file

A quick way of starting to write a new game in Hugo is to start editing a “shell file,” which contains the necessary code base for a game so you can jump straight into things like your game title and writing rooms and such.

Here at Hugo by Example, we’ve been working on a shell file that is a bit more Hugo 3.0-representative than the file on the IF Archive. You can find it here. So, the first thing you do when writing a new game is to open up the shell file and save it with a new name (that’ll one day be <new name>.hex, your new Hugo game, hopefully).

Get the Hugo software and library

Go to the IF Archive (executables section) and look for a version of Hugo for your OS. Be sure that it is a package that includes a compiler, as some of those downloads are just interpreters (like the Hugor links). Install or unzip the package. Also, download the Hugo Library. Unzip that.

Get and read The Hugo Book

(Of course, there’s nothing wrong if you have gotten a head start on this step. You’ll be referring to The Hugo Book a lot.)

These HTML and AsciiDoc versions are due to be updated and will eventually be the most current version of the Hugo Book. You can also peruse the online version.

If you prefer a PDF, you can download Roody Yogurt’s personal book here. If you’re using an Adobe program, there’s a chance you’ll be able to see some extra comments that will offer a tad more light on some things or quicker navigation (including some corrections that will eventually make their way into the HTML version). Add more as you get to parts you think you’ll want to refer to!

Anyhow, now that you are armed with a nice editor, you have the power to write your own little sample code as the Hugo Book teaches concepts to you. It does a good job of going through things like compiling, too, so if that worries you, you’re in good hands.

Don’t worry about getting everything on your first read. As long as you learn how to write rooms and sort of understand basic object concepts like attributes and properties, you’re good to go!

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 useful tips) at your disposal. You can also post coding questions at the Jolt Country’s Hugo forum or intfiction.org’s “other languages” forum. Lastly, if you’d like real-time assistance, there’s the #Hugo channel on the ifMUD.