FAQ Search Memberlist Usergroups
Jolt Country Forum Index
Register Profile Log in to check your private messages Log in
Log in Log in

[Hugo] out with multiple choices

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Jolt Country Forum Index -> Hugo's House of Horrors
View previous topic :: View next topic  
Author Message
Ice Cream Jonsey



Joined: 27 Apr 2002
Posts: 20088
Location: Colorado

PostPosted: Fri Jan 12, 2007 10:08 pm    Post subject: [Hugo] out with multiple choices Reply with quote

Let's say I wanted to do the following in Hugo:


Code:

>out

Which way do you mean? Through the red door or the green door?


Is it possible to get "out" (as a direction) starting a question for the user like that, when there are two door objects in the room? How would I do that?
_________________
the dark and gritty...Ice Cream Jonsey!
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Merk



Joined: 22 Nov 2004
Posts: 192
Location: Wichita, KS

PostPosted: Sat Jan 13, 2007 10:37 pm    Post subject: Reply with quote

Sure. I did this in TTS. There is spot where a ladder leads up (south of you) and steps lead up (north of you). If the player tries to go UP, the game asks them to be more specific.

I didn't do it exactly like you want, though. I think I give a message like "you can climb the ladder to the south or the stone steps to the north" -- something like that. They'll either type "climb ladder" or "climb steps" or maybe "north" or "south". What you're looking for is something that the Hugo engine itself does -- disambiguation. But that only happens when it's trying to match objects to a verb definition, and more than one object qualifies without any rules to treat one as more important than the other.

I know of know good way to mimic *that* behavior. In order for the user to answer the question, you'd either have to (a) have verbs set up that *are* the answers, or (b) maybe give a custom prompt. But that's not ideal, because the user should be able to pick neither, and type something else entirely.

You *might* be able to do it with a PreParse() routine. I think, though, that PreParse() doesn't get called until the engine has already parsed the command line into the word[] array. Actually, it'd have to be like that, else PreParse() would have nothing to look at. If that's the case, the engine will already have complained that their answer ("red door" or "green door") doesn't start with a verb.

But again, you could make pseudo verbs "red" and "green". Have a flag any time the game is actually expecting the user to type one of them (otherwise the flag is false). When it's false, the VerbRoutine can call the library "that's not a verb I recognize" mesasge (or whatever it says).

If I think of any other ideas, I'll post again. It seems like maybe I'm forgetting something that might help.
Back to top
View user's profile Send private message Visit poster's website
Ice Cream Jonsey



Joined: 27 Apr 2002
Posts: 20088
Location: Colorado

PostPosted: Sun Jan 14, 2007 9:54 pm    Post subject: Reply with quote

Thanks, Merk. Yeah, there are definitely some ways to hit this up. I guess I like the slickness of the game asking a direct question to the user, but if it doesn't end up being in the game it won't be the end of the world. Thank you again for your perspective!
_________________
the dark and gritty...Ice Cream Jonsey!
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Merk



Joined: 22 Nov 2004
Posts: 192
Location: Wichita, KS

PostPosted: Tue Jan 16, 2007 12:43 pm    Post subject: Reply with quote

I'm disappointed that nothing really clever comes to mind. I mean, you *could* mimic the behavior by just asking the question and then pausing with a prompt, but it just wouldn't be as slick as real disambiguation because anything that *doesn't* answer the question wouldn't get parsed by the engine.

For now, you could just state that it's not clear (without actually phrasing it as a question), and then do something better if a better idea comes along. If you do figure something out, I'd be happy to know what. There are times where I'd have used the same kind of thing if there was a way.
Back to top
View user's profile Send private message Visit poster's website
Zork VI
Guest





PostPosted: Tue Jan 16, 2007 6:00 pm    Post subject: Reply with quote

>out

Which way do you mean? Through the red door or the green door?

>look green door

While considering an exit, a large impact is made to the top portion of your skull. The last thing you see is a large, hairy, poorly lighted creature draging you through the YELLOW door (the one behind you), that then precedes to devour you whole and semi-concious.

You scored 0 out of 8719 points earning you the rank of, Wondering Prophet.

RESTART, RESTORE, or EXIT?

>restore

EXIT is not spelled RESTART. I'll now correct this mis-spelling for you. Arn't I wonderful?
Back to top
Zork X
Guest





PostPosted: Tue Jan 16, 2007 9:05 pm    Post subject: Reply with quote

>out

Which way do you mean? Through the red door or the green door?

>look green door

The door flies off its hinges and smacks you in the face! Blood running down your eyes, a hand leaving the mark dripping red, the last thing you see is an edge of textured, floating green, above your face before it smashes and connects to the ground through your head.

You scored 9 out of 2032032039 points, giving you the rank of Wonderful Russian.

RESTORE, RESTART, EXIT?

>exit

This game isn't good enough for you, eh? Fuck you! For that, we'll restart and you can play from the beginning because you missed the gum wrapper, you fucken twit.
Back to top
Vitriola



Joined: 10 Mar 2003
Posts: 2426

PostPosted: Tue Jan 16, 2007 10:12 pm    Post subject: Reply with quote

Poor Alana.
_________________
Surprisingly, the buildings that processed the uranium for the bombs are rather nondescript square gray structures.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
Ice Cream Jonsey



Joined: 27 Apr 2002
Posts: 20088
Location: Colorado

PostPosted: Fri Jan 19, 2007 7:59 pm    Post subject: Reply with quote

Merk wrote:
I'm disappointed that nothing really clever comes to mind. I mean, you *could* mimic the behavior by just asking the question and then pausing with a prompt, but it just wouldn't be as slick as real disambiguation because anything that *doesn't* answer the question wouldn't get parsed by the engine.

For now, you could just state that it's not clear (without actually phrasing it as a question), and then do something better if a better idea comes along. If you do figure something out, I'd be happy to know what. There are times where I'd have used the same kind of thing if there was a way.


Yeah, I doubt I will come up with something more elegant, but if I do I'll update this thread or mail you. The prompt doesn't bother me all that much, I suppose, and I think newbies would be able to comprehend it instantly.
_________________
the dark and gritty...Ice Cream Jonsey!
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Ice Cream Jonsey



Joined: 27 Apr 2002
Posts: 20088
Location: Colorado

PostPosted: Fri Jan 19, 2007 8:01 pm    Post subject: Reply with quote

Zork X wrote:
This game isn't good enough for you, eh? Fuck you! For that, we'll restart and you can play from the beginning because you missed the gum wrapper, you fucken twit.


Hey now. That was more a Hitch-Hiker's Guide thing. Although if I remember correctly you could waste a lot of time in Zork III if you didn't do something unmotivated.

I think you can get Fallacy of Dawn in an unwinnable state and that always bugged me. But I think you had to start shooting people to get it that way. And hell, in that case a game (of life?) should be "unwinnable."
_________________
the dark and gritty...Ice Cream Jonsey!
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Jolt Country Forum Index -> Hugo's House of Horrors All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001 phpBB Group

Theme by Kage Musha - RPG Garden

Copyrights and trademarks are all of the belonging company. No copyright Infringement intended