short_desc for rooms

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

Merk
Posts: 192
Joined: Mon Nov 22, 2004 3:19 pm
Location: Wichita, KS
Contact:

short_desc for rooms

Post by Merk »

One of the things that has bothered me in Hugo is that nothing gets printed in a room you've already visted, if there is nothing "extra" to be listed and you're not in "verbose" mode.

For my WIP, I've worked around this by implementing a "short_desc" for my rooms -- a one-liner that basically says "you go back to the cave entrance" or whatever. To make it work, though, some code has to be added to routine DescribePlace.

There is a section, not far from the top, that prints the "initial" or "long" description for rooms not yet visited, followed by the "long" description when you're in verbose mode or possibly doing a "look". The code I added is an "else" after those two conditions:

Code: Select all

else
{
    if &place.short_desc
        Indent
    run place.short_desc
}
I've done a "replace" of the routine, so as not to alter the library itself, but my question is, would there be harm in adding this to the next library update? Is there ever a time when a room short_desc is expected, but for a different purpose? I guess if existing source code uses short_desc for a room, but for a different purpose, it would cause a problem. I don't know. Just a suggestion, anyway. I think it's best to at least say something in a room, even if it's really brief.

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

Post by Ice Cream Jonsey »

I really don't have a take on this one, Sid, as I force all my wares into verbose mode. :)
the dark and gritty...Ice Cream Jonsey!

Merk
Posts: 192
Joined: Mon Nov 22, 2004 3:19 pm
Location: Wichita, KS
Contact:

Post by Merk »

Yeah, that's what I did in my current WIP, until I realized I'd probably be hiding some important stuff that happens afterwards. It seems to me like players would start to tune out the room descriptions, only re-reading them if they felt it necessary (stuck, looking for clues, etc). I figured having a short description for already-visited rooms would help make it more obvious when longer text appears (the important stuff that would otherwise come at the end of the room).

If you're in verbose mode, the code I added is never reached. So it probably doesn't hurt anything. I'm interested to see what Kent thinks, once he checks in. :)

Kent
Posts: 119
Joined: Fri Jun 27, 2003 12:10 pm

Post by Kent »

See what happens when a library designer forces his 1980s-era Infocom-inspired expectations on you?

I see your point.

short_desc should probably be added to the library as a default fallback for rooms.

Merk
Posts: 192
Joined: Mon Nov 22, 2004 3:19 pm
Location: Wichita, KS
Contact:

Post by Merk »

That would be cool!

If you think there's a time when you're going to revisit the Hugo engine and/or libraries, I have a few other suggestions too. Some of this *might* already be out there (in the FB! source or wherever) -- things like a "distant" property that's different from how the check_reach works. if "distant" is true, then verbs that require direct contact would say "it's too far away" (or whatever object.distant_response prints, if non-false). I did this in TTS (although I stupidly used an attribute, which I then had to manually change when things could sometimes be distant and sometimes not).

I didn't change the verb definitions. I just added distant checking to a class that all my game scenery inherited from. In the before.xobject and before.object, I just checked verbroutine for all the possible "physical contact" verbs, and check the distant response then. I return true to block normal verb handling.

I'm full of ideas. :)

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

Post by Ice Cream Jonsey »

Merk wrote:things like a "distant" property that's different from how the check_reach works. if "distant" is true, then verbs that require direct contact would say "it's too far away"
Say, did this sort of get taken care of by that remote_type thing that Kent mentioned in the other thread?

Also! What I would like to do is compile a list of Hugo lib / engine enhancements that we have mentioned and give Kent the URL when it's presentable. I presume that right now he's elbows-deep with Bull, so actually this is a good time for us to get organized.

If I could install a one-page Wiki some place I think it would be perfect. My intent would not be to create a document that goes, "Kennnnnnt! Kennnnn-nnnnnnnt! Pay attention to me!!!" but rather a handy (don't say "one stop shop") one stop shop (god dammit) that he could consult at his leisure, so he does not have to keep track of the suggestions on many different places.

I'll do some investigation on this. As always, thanks for everything you've given us with Hugo, Kent!
the dark and gritty...Ice Cream Jonsey!

Merk
Posts: 192
Joined: Mon Nov 22, 2004 3:19 pm
Location: Wichita, KS
Contact:

Post by Merk »

Good idea! When I get a moment, I could post my wish list here.

I should really check out this remote_class.

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

Post by Roody_Yogurt »

Continuing my rampage through the backlog of Hugo posts here...

Funny, I've also tweaked DescribePlace so that non-VERBOSE modes act like I would like. First off, I changed it so that even in SUPERBRIEF, a room's initial_desc is run. I wanted to be able to keep the option of using initial_desc to start daemons or do whatever (Sure, there are plenty of other places you can turn on daemons, but I still like having that option). Since I rarely use initial_desc anyways, I could always do a verbosity check on any text that I print.

Also, I didn't like how SUPERBRIEF printed the full short_desc of items in rooms (which kind of goes against the intent of the mode), so I changed ShortDescribe so that all items would get the generic, no-short_desc listing.

User avatar
Tdarcos
Posts: 9556
Joined: Fri May 16, 2008 9:25 am
Location: Arlington, Virginia
Contact:

Re: short_desc for rooms

Post by Tdarcos »

Merk wrote:One of the things that has bothered me in Hugo is that nothing gets printed in a room you've already visted, if there is nothing "extra" to be listed and you're not in "verbose" mode.
This has been in either Original Adventure since about 1976 or Dungeon/Zork since about 1980 or so, you can either select verbose (always show everything), brief (only show everything on first visit, just short mention and room contents when returning), or superbrief mode (always do brief even on new places). I'm surprised support for it wasn't built into adventure game systems, since it's been a standard idea for something like 30 years.
"When I die, I want it easy and peaceful in my sleep, like my uncle.
Not screaming and crying like his passengers."

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

Post by Roody_Yogurt »

Yeah, it's built into all of the systems. In this day and age, though, more authors are likely to force their games into VERBOSE mode out of the box.

I think the old modes, among other reasons, were a concession to people who played the games while sending the transcript straight to their printer (I doubt it affected loading times). Plus, it helped speed up getting around large maps when you wanted to get somewhere fast.

These days, I think it's especially nice to support the option for blind people who are using screen readers, but I don't begrudge authors who want their games played a certain way.

Gerynar
Posts: 12
Joined: Tue May 11, 2010 5:50 pm
Location: Indiana
Contact:

Post by Gerynar »

I can make a page on my Hugo By Example wiki for the suggestion list. (http://hugo.gerynarsabode.org)

Free to sign up (do have to sign up to edit pages)

Post Reply