Getting Started With Hugo

This is a discussion / support forum for the Hugo programming language by Kent Tessman. Hugo is a powerful programming language for making text games / interactive fiction with multimedia support.

Hugo download links: https://www.generalcoffee.com/hugo
Roody Yogurt's Hugo Blog: https://notdeadhugo.blogspot.com
The Hugor interpreter by RealNC: http://ifwiki.org/index.php/Hugor

Moderators: Ice Cream Jonsey, joltcountry

User avatar
Jizaboz
Posts: 5474
Joined: Tue Jan 31, 2012 2:00 pm
Location: USA
Contact:

Getting Started With Hugo

Post by Jizaboz »

So far I can't even get any sort of example script to work. I want to at least get something basic going and some basic understanding before diving into Cryptozookeeper code to use as a reference to do some stuff.

Here's what happens when I try to compile Baby Uncle New Year by Roody Yogurt from http://hugo.gerynarsabode.org/index.php ... e_New_Year:

Code: Select all

HUGO COMPILER v3.1.03 by Kent Tessman (c) 1995-2006
The General Coffee Company Film Productions
Win32 port by Kent Tessman

Fatal error:  Unable to open verblib.g

Unable to compile using '"C:\Program Files (x86)\Hugo\hc.exe" @list=. -ls "C:\Documents and Settings\Administrator\Desktop\example.hug"' - Exit code = 2 (1)
Looks like I'm missing some sort of lib file?

User avatar
Ice Cream Jonsey
Posts: 30184
Joined: Sat Apr 27, 2002 2:44 pm
Location: Colorado
Contact:

Post by Ice Cream Jonsey »

Welcome! To Hugo!!

You just need the standard library unzipped and in the same directory as your source file for Baby New Year:

http://www.ifarchive.org/if-archive/pro ... ugolib.zip

Just unzip that and you should find the verbstub or verblib files!
the dark and gritty...Ice Cream Jonsey!

Roody_Yogurt
Posts: 2256
Joined: Mon Apr 29, 2002 6:23 pm
Location: Milwaukee

Post by Roody_Yogurt »

First off, I imagine ICJ didn't want to be a nag, but you accidentally posted your question to the wrong base. In any case, yeah, welcome to Hugo!

I mean to write a Hugo By Example page about it, but one of the neat Hugo tricks I've picked up in the last year or so is its use of "environment variables."

Now, I imagine all sorts of programming languages have support for Windows environment variables, but Hugo is my first exposure to it. Basically, it's a nice way to instruct Hugo where you keep your files or want them to go without having messy compilation commands or keeping everything in one directory.

First, look up how to set up environment variables for your version of Windows.

Then, set the following environment variables:
HUGO_SOURCE - directory where you'll be keeping your source files
HUGO_OBJECT - directory where you want new compiles to show up
HUGO_LIB - directory where you have the Hugo library files

Those are the most important, but you can also have the following if you want:
HUGO_LIST - where you want .lst files to show up (files that list compilation statistics)
HUGO_RESOURCE - where to look for resource files
HUGO_TEMP - temporary compilation files

Now, unless your command line or game source tells Hugo to look specifically somewhere else for necessary files, it'll look in those preset directories.

Anyhow, for me, it helps keep my command lines and directories a lot prettier and more organized.

User avatar
Jizaboz
Posts: 5474
Joined: Tue Jan 31, 2012 2:00 pm
Location: USA
Contact:

Post by Jizaboz »

Cool. Thanks a lot guys! That will get me started.

Yeah.. I feared I had posted this to the wrong section last night as soon as I realized I couldn't find my own post this morning.

Maybe someone can move it over to the Hugo section? Sorry about that. Beers.

User avatar
Jizaboz
Posts: 5474
Joined: Tue Jan 31, 2012 2:00 pm
Location: USA
Contact:

Post by Jizaboz »

Ice Cream Jonsey wrote:Welcome! To Hugo!!

You just need the standard library unzipped and in the same directory as your source file for Baby New Year:

http://www.ifarchive.org/if-archive/pro ... ugolib.zip

Just unzip that and you should find the verbstub or verblib files!
I've been busy so I'm just now getting around to this...

It still does not compile. I extracted the files from the link above into a /baby folder that I copy+pasted the new year code into a baby.hug file nested within My Docs on this Windoze machine and I receive the same error. I also tried copying them into my Hugo folder for kicks and that gave the same result.

I don't see a config file or setting or whatever to make sure Hugo is looking for these libs in a certain folder, if that is what I'm missing.

P.S. Would still be nice to have this thread moved to the Hugo base. Sorry again to ACK dudes for this being here.

Roody_Yogurt
Posts: 2256
Joined: Mon Apr 29, 2002 6:23 pm
Location: Milwaukee

Post by Roody_Yogurt »

Is it still complaining about verblib.g (which means, yeah, it's still not finding the library) or has it moved on to something else?

The Baby Uncle New Year page ( http://hugo.gerynarsabode.org/index.php ... e_New_Year ) points out that it also needs the files "glk.h", "opportune.h", and "boxdrawglk.h". Those are non-standard extensions (you can download them from the pages it links to).

You might want to try compiling the official Hugo sample game, the Vault of Hugo, instead, as it is a good one-file game (well, not including the library):
http://www.ifarchive.org/if-archive/pro ... sample.hug

Roody_Yogurt
Posts: 2256
Joined: Mon Apr 29, 2002 6:23 pm
Location: Milwaukee

Post by Roody_Yogurt »

Also, if you are using the official Windows installation, the Hugo compiler frontend, hcwin.exe, allows you to set up all of the directories to look for files. Under Options (you may have to cancel out of some initial compiler dialogue), go to Setup.

Set the "source files" directory to the directory with your game source ("baby.hug" or "sample.hug"). Set the "library files" directory to the directory with the library files (hugolib.h, verblib.h, verblib.g, etc).

Once that is set up, go to File and select Compile.

The compiler frontend does some things that I don't like (like, it doesn't like when you switch what you're compiling in one session) so in the long run, I'd recommend compiling your game through your text editor (if your text editor supports it), but the frontend can be a good way to get familiar with compiling Hugo games.

User avatar
Jizaboz
Posts: 5474
Joined: Tue Jan 31, 2012 2:00 pm
Location: USA
Contact:

Post by Jizaboz »

Roody_Yogurt wrote: The Baby Uncle New Year page ( http://hugo.gerynarsabode.org/index.php ... e_New_Year ) points out that it also needs the files "glk.h", "opportune.h", and "boxdrawglk.h". Those are non-standard extensions (you can download them from the pages it links to).
Doh! That's what I overlooked. Thanks Roody_Yogurt!

I'm going to try to give this a whirl in Linux soon as well.

User avatar
Jizaboz
Posts: 5474
Joined: Tue Jan 31, 2012 2:00 pm
Location: USA
Contact:

Post by Jizaboz »

Well, I finally got time to come back to this after IFcomp and all. I'm getting stuff to compile now and have been tinkering around with a graphic window (using pinback's cafeteria) and basic descriptions and stuff today while the turkey cooks.

Fun to mess with so far! Thanks again for helping me get started, dudes.

Post Reply