Page 1 of 1

Getting Started With Hugo

Posted: Thu Jun 07, 2012 3:49 pm
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?

Posted: Thu Jun 07, 2012 4:58 pm
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!

Posted: Thu Jun 07, 2012 8:48 pm
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.

Posted: Fri Jun 08, 2012 6:03 am
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.

Posted: Mon Jun 18, 2012 3:00 pm
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.

Posted: Mon Jun 18, 2012 3:55 pm
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

Posted: Mon Jun 18, 2012 4:02 pm
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.

Posted: Tue Jun 19, 2012 5:14 am
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.

Posted: Thu Nov 22, 2012 1:02 pm
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.