intfiction.org

The Interactive Fiction Community Forum
It is currently Sat May 18, 2013 9:16 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 47 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
PostPosted: Fri Oct 29, 2010 2:33 pm 
Offline

Joined: Thu Oct 28, 2010 9:21 pm
Posts: 19
matt w wrote:
I respectfully disagree on the CYOA question. When I think CYOA I think multiple explicitly given choices with some branching (even if most of the branches terminate quickly); definitely not of things that loop you back till you get the right answer. The game Tigger is describing seems most like "The Grand Quest" or "Gleaming the Verb" from the 2009 comp, both of which had strictly linear progression through a series of puzzles; in The Grand Quest you were gated through a series of rooms, in Gleaming the Verb as soon as you answered a puzzle you got the next clue. But they wouldn't have worked as CYOAs, because the puzzle was to guess the answer, as a riddle; if the choices had been given explicitly the answer probably wouldn't have been obvious.


Thank you. Not only do I agree, but you've given me two great leads. I will investigate "The Grand Quest" and "Gleaming the Verb" immediately.



matt w wrote:
Anyway, to the original question, why not just automatically move the player from one room to the next, if that's what you want to do? If you want them to automatically move from one room to the next you don't actually need to implement a connection. I think something like "Now the player is in (whatever the next room is)" will work, with appropriate conditions and text about the player going in the next room. (Don't have time to check the exact syntax.)


Yes, that's what I would like to do. I still believe Inform can help me here, but I've yet to see any game (or code) that's remotely similar (of course, I haven't looked into your two previous references... yet). I'm looking for precicsely what you term "appropriate conditions" and "the exact syntax"! Those are not mere details... they are the core of what I'm after! :)

I can't just have people automatically transporting from room to room. It has to be conditional:

- Room1. there's a bunch of crap in it (objects, scenery, a dude who talks, etc.). describe it all to the player (including the riddle that needs to be solved). ask the player: who stole the dude's cheese?

- await user input

- if correct (and i know Inform is pretty flexible with user-input, as i can code synonyms for the correct answer) then move user to Room2
- else, do nothing (user stays where he is. frustrated.)

- repeat until bored


I know Inform wasn't designed to handle this, but there's nothing (so far) which tells me it can't handle it. To me, it seems simple... but I'm no Inform pro, that's why I posted it here.


Top
 Profile Send private message  
 
PostPosted: Fri Oct 29, 2010 5:28 pm 
Offline

Joined: Sun Oct 17, 2010 9:52 am
Posts: 3
This, I think, will compile, and may be starting point for what you want to do.
(I’m sure the code is much less elegant than it could be …)

Code:
Include Basic Screen Effects by Emily Short.

A room has a list of indexed text called facit.

The successor is a direction.
The predecessor is a direction.
The successor has opposite predecessor.

#1 is a room. "Fatumeh has just eaten her fill of kiwifruits. However, she still has 15 fruits left and wants to divide them equally among her 3 brothers (Tom, Dick, and Harry). How many kiwifruits will Harry get from her?" The facit of #1 is {"5"}.

#2 is a room. #2 is successor of #1. "Lincoln's Gettysburg Address begins:[line break][bold type]'Four ___ and seven years ago'[roman type].[paragraph break][italic type](Please type the missing word at the prompt below.)[roman type]". The facit of #2 is {"score"}.

#3 is a room. #3 is successor of #2. "How many kiwifruits will Tom have?" The facit of #3 is {"5"}.

Last after reading a command:
   let L be a list of indexed text;
   add the player's command in lower case to L;
   if L is the facit of the location:
      reinforce;
   otherwise:
      extinguish;
   stop the action.
   
To reinforce:
   say "[one of]Correct.[or]Quite right.[or]Good.[or]Exactly.[or]That's right.[in random order]";
   try going successor.
   
To extinguish:
   say "The correct answer is:[line break][facit][paragraph break][italic type](Press any key to continue)[roman type][paragraph break]";
   wait for any key;
   try going successor.
   
To say facit:
   say the facit of location.

Instead of going nowhere from a room:
      say "[paragraph break]We're finished.";
      stop game abruptly.


Top
 Profile Send private message  
 
PostPosted: Fri Oct 29, 2010 5:45 pm 
Offline

Joined: Wed Sep 22, 2010 12:34 pm
Posts: 57
Location: OKC, OK
This might not be the most original idea, but in Room #1 I would put a door that gets unlocked when the player's score => 1. Set the door in Room 2 to unlock when score >= 2, and so on. Then, give the player a point for solving each room's puzzle. When they solve a puzzle the door will open, and they can always move backwards.

_________________
---
Rob "Flack" O'Hara
robohara.com | twitter.com/Commodork | facebook.com/robohara


Top
 Profile Send private message  
 
PostPosted: Fri Oct 29, 2010 10:11 pm 
Online

Joined: Tue Mar 09, 2010 2:34 pm
Posts: 2127
Location: Burlington, VT
This is the sort of thing I was thinking of. I've taken George's code and changed it so that when you give the correct answer it automatically moves you to the next room:

Code:
The Manipularium is a room. "Here you manipulate. There is a locked door to the north." The Pullarium is a room. "Here you pull. There is a locked door to the north." The Contactorium is a room. "Here you contact. There is a locked door to the north."

Instead of going, say "The only exit is the locked door to the north, which is locked."


The block answering rule is not listed in the report answering it that rulebook.

Instead of answering yourself that it when in The Manipularium:
    if the topic understood matches "manipulate":
        say "Correct!";
        say "The door to north unlocks, and you go through it. As you do it vanishes behind you.";
        move the player to the Pullarium;
    otherwise:
        say "Gesundheit!"

Instead of answering yourself that it when in The Pullarium:
    if the topic understood matches "pull":
        say "Correct!";
        say "The door to north unlocks, and you go through it. As you do it vanishes behind you.";
        move the player to the Contactorium;
    otherwise:
        say "Gesundheit!"

Instead of answering yourself that it when in The Contactorium:
    if the topic understood matches "contact":
        say "Correct!";
        say "The door to north unlocks, and you go through it. Outside is sweet freedom!";
        end the game in victory;
    otherwise:
        say "Gesundheit!"

test me with "n / e / s / u / say xyzzy / say Manipulate / u / say pull / u / u / say contact"


Now there are several awful things about this, most prominently that the door is mentioned in the description but you can't do anything with it. If you're going to use this sort of thing you need to implement a door-object that the player can interact with, even if they can't open it and use it to go north. Maybe it'd work best to implement it as a locked (and impossible to unlock) door; but anyway, if you want to automatically move the player to a room, "Move the player to the Pullarium" works.

You probably also want some different ways of parsing the answer; I have no particular ideas here.

Also, there's no reason to be snippy with the people who are talking about CYOAs. They were being perfectly polite and trying to help; which I suppose is "trying something," but it's not like anyone was trying to put one over on you.


Top
 Profile Send private message  
 
PostPosted: Sat Oct 30, 2010 12:53 am 
Offline

Joined: Wed Oct 13, 2010 1:42 am
Posts: 343
Is there a reason why just using "now the player is in Room 2" wouldn't be optimal?

I also still think that having the player tell the answer to someone is the easiest and most intuitive interface. I mean, it's 3 (edit: I can count) lines:

Code:
After telling the Sphinx about "[man]":
say "Correct!";
now the player is in Room 2.


Last edited by katz on Sat Oct 30, 2010 12:41 pm, edited 1 time in total.

Top
 Profile Send private message  
 
PostPosted: Sat Oct 30, 2010 1:26 am 
Offline

Joined: Thu May 20, 2010 9:33 pm
Posts: 479
Tigger31337 wrote:
There are no "choices" to be made, here. The player examines a richly-detailed room (possibly containing objects, characters, dialogue, etc.) but the player has exactly ONE move to make: answer the riddle. You either pass, or fail. If fail, stay where you are. If pass, move on to the next room/scene/riddle. The entire plot (if you want to call it that) is PRE-DETERMINED. Indeed, my work is the exact opposite of CYOA.

Yes, I understand that the plot is PREDETERMINED. The exact playthrough, however, is not (which is what distinguishes any interactive work from a non-interactive one!), and "you either pass, or fail" is a branch in the gameplay tree, even if it is not a particularly divergent one, plotwise.

Perhaps the word "choice" is the problem here, since it implies moral agency or something. It does sound a bit silly to say "The student chose to answer that 2+2=4," but we get that in the phrase "multiple choice exam" as well.

Tigger31337 wrote:
The player examines a richly-detailed room (possibly containing objects, characters, dialogue, etc.) but the player has exactly ONE move to make: answer the riddle.


Ah, well, that does sound a bit different than what you were talking about before. But I'm confused: does the examining of the room happen over several moves, or is it all in a static printed paragraph? I can definitely understand why you want a more robust world model if the former, but your description earlier (and "ONE move to make") sound more like the latter.

I want to clarify, by the way, that my intent is not to malign your project, either in general or by comparing it to CYOA (which you may have heard negative rhetoric about around here). I just thought that it sounds structurally similar to CYOA, and therefore that extensions like Adventure Book would be a good jumping-off point for your code.

mattw wrote:
In The Grand Quest you were gated through a series of rooms, in Gleaming the Verb as soon as you answered a puzzle you got the next clue.


Well, in The Grand Quest, they were (mostly) object-manipulation puzzles (requiring a model world), not puzzles where you proceed by saying the right phrase. From the example that Tigger31337 gave in hir first post ("The keypad display reads "2+2=". What number do you punch on the keypad in order to unlock the door?"), this game would be a lot more call-and-response.

And I think it's interesting that you list Gleaming the Verb, since one could argue (and several did, in their Comp reviews) that it wasn't "really IF."
Spoiler: show
Sure, the magic words that you said to proceed looked like IF commands, in that they took the form of the verb and an object, but there was no indication that you were "actually" performing that action on the object -- in fact, one of the verbs was not even one that could sensibly have applied to the object.

I quite agree that Gleaming the Cube would be a good precedent for Tigger31337 to take a look at, at any rate.

So it sounds like you (mattw) are categorizing CYOA based on whether the paths are explicitly demarcated, and I am categorizing CYOA based on whether or not the world is modeled beyond having a look-up for what the current right answer is. Arguably, of course, my definition has a fuzzy boundary (imagine a puzzle-room in which you simply have to push a rock away from the door to proceed. Is it IF because you are affecting the model world by model-pushing a model rock away from a model door, or can we treat it as CYOA and just check to see if the player typed the magic phrase "push rock"?), but I think we've already seen that boundary poked at from both sides in CYOA-with-a-lot-of-flags and IF-with-menu-based-conversation. Anyway, it's always interesting to see what different people think of as the one true defining characteristic of any given category (especially when that category does have multiple common characteristics, as this one clearly does). On that note, I'd be curious as to what you think the exact opposite of CYOA is. I say "a televised production of a Jacobean tragedy." :P


Top
 Profile Send private message  
 
PostPosted: Sat Oct 30, 2010 4:34 am 
Online

Joined: Tue Mar 09, 2010 2:34 pm
Posts: 2127
Location: Burlington, VT
tove wrote:
And I think it's interesting that you list Gleaming the Verb, since one could argue (and several did, in their Comp reviews) that it wasn't "really IF."
Spoiler: show
Sure, the magic words that you said to proceed looked like IF commands, in that they took the form of the verb and an object, but there was no indication that you were "actually" performing that action on the object -- in fact, one of the verbs was not even one that could sensibly have applied to the object.


True -- and that was something I kind of had in mind -- but I don't think anyone argued that it was CYOA. People tended to say things more like "It's a series of word puzzles."

Quote:
So it sounds like you (mattw) are categorizing CYOA based on whether the paths are explicitly demarcated, and I am categorizing CYOA based on whether or not the world is modeled beyond having a look-up for what the current right answer is. Arguably, of course, my definition has a fuzzy boundary (imagine a puzzle-room in which you simply have to push a rock away from the door to proceed. Is it IF because you are affecting the model world by model-pushing a model rock away from a model door, or can we treat it as CYOA and just check to see if the player typed the magic phrase "push rock"?), but I think we've already seen that boundary poked at from both sides in CYOA-with-a-lot-of-flags and IF-with-menu-based-conversation. Anyway, it's always interesting to see what different people think of as the one true defining characteristic of any given category (especially when that category does have multiple common characteristics, as this one clearly does).


Yeah, I definitely think of explicitly demarcated multiple choices as defining the CYOA. I don't suppose I have any argument for that, just a sense that that's what people usually mean. And I'd think of keyword-based IF as another raid on the boundary; there are a finite number of keywords you can type, but there may be a lot of them, and they map to interactions with the model world in some way. (Though all, and I think I mean both, of the keyword-based IFs I've played allow you to go outside the keyword anyway.)

I wonder if it makes a difference to our sense of what CYOA is that I grew up with the Edward Packard books. (And the R.A. Montgomery ones, but Packard's were just better.) Did you read the books at all?


Top
 Profile Send private message  
 
PostPosted: Sat Oct 30, 2010 4:31 pm 
Offline

Joined: Thu Oct 28, 2010 9:21 pm
Posts: 19
First of all, there's lots of good stuff coming in, so thanks for that.

I still see a persistence to categorize my work as (or compare it to) CYOA. Rest assured, you are doing CYOA an injustice if my simple little linear plot is lumped into that category. When (most) people use "CYOA" they are doing so in a context that does not (normally) include my work - on any level of description.

That being said (and I hope we can put this CYOA thread behind us now) I'm making great progress with the code. I'm working off George's original post (with mods by others, notably matt w.). I've removed the door and all references to it. For now, the user is simply transported from room to room. Since the game has no plot and disjointed scenery from one room to the next (on purpose), I didn't want the player physicaly moving through space (i.e. walking) to get from one level to the next. I thought it ruined the surrealism.

Everything works, and the player movement happens automatically upon producing the correct answer. The only thing I'm now stuck on, is this:

I find Inform to be a little TOO lenient with what it considers a correct response.

Example:
In one room, the player hears a piece of classical music. I've coded appropriate responses to be "Vivaldi", "Antonio Vivaldi", and "Antonio Lucio Vivaldi". Inform is great for ignoring case (so things like "vivaldi" or "antonio vivaldi" are also accepted) but I also find things like "Vivaldiii" or "Vivaldinorium" or "Vivaldiopolous" getting through.

Now, I'm all for 16th century Greek composers, but "Vivaldiopolous" wasn't one of 'em. And he certainly isn't the correct answer to pass my level. Yet the player does. I thought this wouldn't be a serious problem (hell, if you know the answer to be "Vivaldi", and you type "Vivaldikicksass"... fine, I'll give it to you!) but the problem is unacceptable when it comes to some of my "cypher" rooms. Occasionally, I've got a room with a block of cyphertext that needs to be decrypted. Here, if the correct answer is "31337" and you type "31337241" then I do NOT want you to pass. (Yet the player does).

The mechanism I'm using to parse the correct answer is via the if the topic understood matches "xxx". I've read that I can use "is identical to" or "is identical with", instead of "matches", but that still doesn't work.

Any tips on how to make Inform match *exactly* a string of text from the user? Perhaps using the "topic understood" mechanism isn't the most flexible, here.

Thanks, again, in advance.


Top
 Profile Send private message  
 
PostPosted: Sat Oct 30, 2010 4:44 pm 
Offline

Joined: Thu May 20, 2010 9:33 pm
Posts: 479
Tigger31337 wrote:
Any tips on how to make Inform match *exactly* a string of text from the user? Perhaps using the "topic understood" mechanism isn't the most flexible, here.


Have you tried "exactly matches"? Assuming you're using indexed text (the distinctions between indexed text and "topics" are not exactly clear to me, other than the fact that apparently "topics" can only be checked against player inputs), Chapter 19.5, "Matching and Exactly Matching" may be what you're looking for.


Top
 Profile Send private message  
 
PostPosted: Sat Oct 30, 2010 5:24 pm 
Offline

Joined: Thu May 20, 2010 9:33 pm
Posts: 479
matt w wrote:
I wonder if it makes a difference to our sense of what CYOA is that I grew up with the Edward Packard books. (And the R.A. Montgomery ones, but Packard's were just better.) Did you read the books at all?


Probably not. I think I read a few CYOA-type books growing up, but they were pretty unmemorable.

An interesting thing about that edge case of keyword-based IF is that in many such games, you can take actions that are not keyword-based, but they're not necessary to win. A totally parser-free keyword-based game, however, could have the same basic code structure as a work of CYOA -- if the only verb is "use" (which is sort of a loose translation of "click"), the options for any given scene narrow rapidly.

Anyway, I'll certainly cede the point that my internal taxonomy is or could be inconsistent with the rest of the community's. The original point I was trying to make in this thread was that I was surprised by Tigger31337's assertion that hir game had no branching, which seemed like an absurd stance to take: linear plot is not the same thing as linear interaction/code. And that Ron Newcomb's comment was really not that much of a stretch.


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 47 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group