One-word-interface as a basis for storytelling in Inform 6

After writing some IF for friends, in I7, I am slowly getting interested in starting writing something to officially release. But in I6.

The majority of all IF works are primarily designed around solving puzzles by the use of objects. At this time I’m more interested in works like Galatea, The Endling Archive, The Space under the Window, Whom the Telling Changed and Starborn; works that to a greater degree are primarily oriented towards simple somewhat experimental interactive storytelling.

The one-word-interface (with the nice option of choosing the style of emphasized words) of Starborn and also in Whom the Telling Changed is what I am primarily interested in here, and that’s what my question is about.
Of the stories mentioned only Juhana Leinonen’s Starborn is available as I7 source. ([url]Google Code Archive - Long-term storage for Google Code Project Hosting.)
Now that should be satisfying enough if it wasn’t that I am considering to do my writing in inform 6.
I have no coding experience besides I7 from earlier on but am trying to learn by reading R. Firth’s & S. Kesserich’s book - Inform for Beginners.

The Inform Designer’s Manual taught me to make something like this.

Verb 'xyzzy' * -> Xyzzy; [ XyzzySub; "And all that it gave me was this text..."; ];
But that is rather limiting compared to the sophistication of the one-word-interface in the Starborn source.

So here I am asking for some help and advice on how to go about. Examples of code would be great. Suggestion to helpful extensions that might aid would also be very useful, apart from general do and donts.

Or more specific things maybe, like this;
How to make the program note that a word have been read once and than change the words colour and description, and than if it is read a second time, let that in turn change things behind the scene in the story?

Maybe you have better ideas of what would be useful mechanisms to build into the source?
Any help is appreciated. If I eventually get more fluent in writing code, this will be how I got there.

Thank you.

Why I6 instead of I7?

I’m sure others have this question. I can’t speak for Mangleus, but I can give you a couple of good reasons why some people may prefer I6 to I7.

First, the syntax of I6 is more transparent and easily understood. The kinds of questions that so often bedevil people who are learning I7 just don’t arise.

Second, if you’re writing a game that you hope will be played on a mobile device, I6 is preferable because a game of the same size compiles more compactly. It takes up less memory – so you can fit a larger game into the .z8 format.

Third, I’m pretty sure I6 has not, in recent years, been updated in such a way as to break the extensions. (Someone will correct me if I’m wrong on this.) There are some early extensions (the OR stuff) that I think is obsolete, but extensions written for I6 fifteen years ago still work, unlike I7 extensions written only seven years ago, many of which have been broken by the changes in I7.

There are reasons to prefer I7, of course. The nice cross-platform IDE, for example, and how easy it is to get started. But I6 is still a very viable language, and pretty straightforward to learn and use.

I just wrote a little snippet to help you!

Go to English.h and find “LanguageToInformese”; it should be an empty routine. Replace it with

[ LanguageToInformese at;
  at = 2; LTI_Insert(at, 'v'); LTI_Insert(at+1, 'e'); LTI_Insert(at+2, 'r'); LTI_Insert(at+3, 'b'); LTI_Insert(at+4, ' ');

What this code does is that it adds “verb” in front of every command. Like “sword -> verb sword” - the ‘verb’ is a placeholder, if you want. You want to insert this placeholder to be able to recognize it in your grammar:

Verb 'verb'
* noun        -> Interact;

And now, you have the action “Interact”, that you can use in your objects (“before [; Interact: “You take the sword.”;],”, or something like that).

Even niftier is this code:

[ InteractSub;
  "You don't know how to do that.";

[ PleaseDontSub;
  "This game is not like others: don't use the usual verbs.";

[ NoComprendoSub;
  "I don't understand this.";

[ informVerb w ;
  w = NextWord();
  ! put here whichever common verbs you want to intercept
  if (w == 'take' or 'drop') {return GPR_PREPOSITION;} else {return GPR_FAIL;}

Include "Grammar";

Verb 'verb'
* noun      -> Interact
* informVerb topic   ->PleaseDont
* topic     -> NoComprendo;

What it does: if you type a correct noun, it starts the Interact action on it; if not, it checks if the command looks like “take X” or “drop Y” and tell the player that she doesn’t need to use such verbs; if nothing works, it says it doesn’t understand.

Welcome to the community of I6 coders by the way :wink: Feel free to ask more questions, I’ll try to help you!

Yes, Jim Aikin
I agree with all that you say (except that ‘’…I6 is more transparent and easily understood’ :slight_smile: for me that not even know how to code in Basic, i6 almost drive me nuts). I wonder if i6 will survive? (despite being the zcode engine under the hood of i7…).

Wow. Thank you so much! This looks great. I REALLY look forward to to sit down and work with this, which i will, in a few weeks time. This was more than i had expected.

There is a command in Starborn that I wonder how to do in i6. L or List or even enter lists the available keywords that are still not used and even the name of the exits. In a very complex dense story this could be useful, to prevent the player from missing a piece, or to get lost in the complexity. A list of either USED or UNUSED keywords could maybe be invoked.

I hope the things mentioned here will be of benefit for other people than me that are interested in Inform 6.

Cheers Jim :slight_smile: I’ve not looked at I6, only I7. I do find it deceptively simple, as I said elsewhere. Coming from a scripting, rather than a programming, background it’s been fairly easy to pick up.

There are some fun traps, but working around those is also fun. And this board is such a great help, there are some right clever people around here! Reading people’s questions, and the replies and discussions is brilliant, really helps.