I'm trying a sample with Hugo and something is missing

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
Tdarcos
Posts: 9341
Joined: Fri May 16, 2008 9:25 am
Location: Arlington, Virginia
Contact:

I'm trying a sample with Hugo and something is missing

Post by Tdarcos »

I notice one immediately glaring omission in the Hugo programming language. Include files.

Apparently you can't break up a hugo source into multiple source files and then include them. Even Turbo Pascal version 3 supported this, and I find the omission strange.
"I really feel that I'm losin' my best friend
I can't believe this could be the end."
- No Doubt, Don't Speak

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

Re: I'm trying a sample with Hugo and something is missing

Post by Ice Cream Jonsey »

Tdarcos wrote:I notice one immediately glaring omission in the Hugo programming language. Include files.

Apparently you can't break up a hugo source into multiple source files and then include them. Even Turbo Pascal version 3 supported this, and I find the omission strange.
No, you can. I ended up with this for my last game:

Code: Select all

#include "verblib.g"					! grammar must come first
#include "hugolib.h"					! standard library routines
#include "contain.h"
#include "system.h"
#include "window.h"
#include "resource.h"
#include "cango.h"
#include "config.hug"
#include "jObjects.hug"
#include "jSceneryLibrary.hug"
#include "jScenery.hug"
#include "jPluralClass.hug"
#include "jVats.hug"
#include "jDaemons.hug"
#include "jIdleDaemons.hug"
#include "jTwinDaemon.hug"
Some of those I made myself and some of those I grabbed from other sources.

This SHELL.HUG file is what a lot of people use to get started. There's an example of including libraries in it:

http://ifarchive.heanet.ie/if-archive/p ... /shell.hug

We will help you with all our might, Commander!
the dark and gritty...Ice Cream Jonsey!

Post Reply