Discussions about interactive fiction

Archive for October, 2010

I7: Gone but not forgotten

I’ve been playing around with Inform 7 to get a feel for it.  So far, my
overwhelming reaction is that I7 is amazingly *fun* to code in,
regardless of any other issues.

I’m implementing a somewhat ferocious receptionist.  Make any move
towards hanky-panky while in her presence (rearranging the furniture and
so forth), and she briefly brandishes a gun in your direction.

I’d like the player to be able to EXAMINE THE GUN once it has been
produced, giving a response of "Gone but not forgotten".  Any other
references to the gun should produce an error: "The gun is no longer in
evidence."

What’s my best approach on implementing this?  I’ve tried various games
with scoping (leaving the gun out of play but in scope), but none of
them seem to produce the right results.  I’ve also considered moving the
gun into the receptionist’s possession after its first appearance, but
that doesn’t seem quite right either.

Any suggestions?

Another question: Is there a better way to override the "You can’t go
that way" message than this?

  Instead of unsuccessful attempt by the player trying going in the
  corridor, say "You can only go east or west."

                       - Damien

NewsGuy.Com 30Gb $9.95 Carry Forward and On Demand Bandwidth

.
posted by admin in Uncategorized and have Comments (8)

[I7] The full (Monty) Python

A wistful thought on I7 syntax: The use of commas, colons, semicolons is
occasionally disconcerting.  The use of "begin", "otherwise", and other
control flow decorations is (to me) always disconcerting.  Was a
Python-style approach of using indentation to control block structure
ever considered?

Consider:

Every turn during Uncomfortable Couch:
    If the time since Uncomfortable Couch began is 1, say "You shift
      around on the couch, trying to get comfortable.";
    If the time since Uncomfortable Couch began is 2
    Begin;
        Say "Something hard in the couch pokes you. Of course; no
          self-respecting evil dentist would keep a comfortable couch
          in the waiting room.";
        Now the couch is known;
    End if.

Here, you need to remember when to use a full stop to end a sentence vs.
a semicolon.  The syntax for creating a block introduces a programmatic
dialect that clashes with the more natural statements.  If you cut and
paste a statement out of a block, you need to remember to change the
terminating semicolon to a full stop.

Now consider:

Every turn during Uncomfortable Couch:
    If the time since Uncomfortable Couch began is 1, say "You shift
      around on the couch, trying to get comfortable."
    If the time since Uncomfortable Couch began is 2:
        Say "Something hard in the couch pokes you. Of course; no
          self-respecting evil dentist would keep a comfortable couch
          in the waiting room."
        Now the couch is known.

A block is introduced with a colon, and the extent of a block is defined
by the indentation of the statements in it.  Sentences may always end
with a full stop, even when they occur as part of a block.  Personally,
I find that this reads much more naturally than the current I7 syntax.

                       - Damien

NewsGuy inserts spam in my posts whenever I forget to add a .sig.  Isn’t
that a nice way to treat a paying customer?

posted by admin in Uncategorized and have Comments (3)

Inform 7: command tool/compile process documentation ?

Hi,

I am trying to figure out how a Java version of the interface would be
possibly implemented, as far as I can see, the IDE communicates with a
set of command tools through their standard I/O channels (what a
surprise…).

Is there any high-level view on the compile process and/or
documentation of the interface to the tools that one could point me to
(would save me some time instead of trying to extract the details from
the code) ?

Thank you,

Wei-ju

posted by admin in Uncategorized and have Comments (3)

[I7] Possessiveness and apostophe handling

Okay, first I7 impressions – great, wonderful, fantastic, why hasn’t
somebody done this before?

Second impressions – aargh! why won’t it understand what I want to do?

Third impressions – that darned NPC route finding code I spent a weekend
hacking together in I6 takes about 6 lines in I7… darnit!

But two programming issues have arisen, and I’m only halfway through the
documentation so it’s possible I haven’t reached the answers yet:

1. Is there any way to get the apostrophe conversion to a quote
suppressed in a string? Trying to talk about the pocketwatch of
Inspector Davis doesn’t work, as "Inspector Davis’ pocketwatch" converts
the apostrophe.

2. Is there any way to suppress the printing of an object in a room
description? All the talk of concealed objects in the documentation only
mentions objects carried by people. I thought I might be able to trap
the "writing a paragraph about" activity, but either I’m getting the
syntax wrong or I’m on the wrong track.

But otherwise, I’m back to great, wonderful, fantastic. Great work all.
Regards
Rob

NewsGuy.Com 30Gb $9.95 Carry Forward and On Demand Bandwidth

posted by admin in Uncategorized and have Comments (14)

I7: changing either/or property of randomly chosen object

I’m just getting started with Inform 7, and I’ve run into a problem
with changing the state of an either/or property of a randomly chosen
object. The relevant source code is as follows:

    A cake is a kind of thing.
    A cake is either squashed or intact.
    A cake is usually intact.
    Before printing the name of a squashed cake: say "squashed ".

    Before going: if the location of the player contains more than two
cakes, say "You step on [a random cake in the location of the
player]."; change the cake to squashed.
    Before listing contents: group cakes together as "cakes".

The offending sentence is "change the cake to squashed." It produces
the following error message:

    Problem. In the sentence ‘change the cake to squashed’  , it looks
if you intend ‘<no text>’ to be the value of a property of something,
but the property ‘squashed’ has no value: it’s something which an
object either is or is not.

I appear to be using the correct syntax for changing either/or
properties according to chapter 7.4 of the documentation. Am I using
the wrong syntax (the cake) to refer to an object randomly chosen in
the previous sentence (a random cake in the location of the player)?

posted by admin in Uncategorized and have Comment (1)

Inform 7: Future Documentation

Is it possible for someone to Acrobatize the current documentation
included in the compiler?
Also will there be a hard copy of something like the Inform Beginner’s
Guide: Inform 7 in the future?

posted by admin in Uncategorized and have Comments (24)

[I7] conditional say rules

This is hurting me in my soul:

The toolcase is an openable container.
To recite (something – closed container):
   Say "The [noun] is closed."
To recite (something – open container):
   Say "The [noun] is open."
Instead of searching the toolcase, recite the toolcase.

This prints "The toolcase is open." whether the toolcase is open or
closed. Is this a blatant bug, or am I not understanding something?

(I originally tried:

To recite (something – container):
   Say "The [noun] is closed."
To recite (something – open container):
   Say "The [noun] is open."

…on the theory, explained in 10.16, that narrower conditions take
precedence. Didn’t work.)

–Z


"And Aholibamah bare Jeush, and Jaalam, and Korah: these were the borogoves…"
*
If the Bush administration hasn’t thrown you in military prison
without trial, it’s for one reason: they don’t feel like it. Not
because of the Fifth Amendment.

posted by admin in Uncategorized and have Comments (7)

I7 guess-the-phrase

I found a new problem which doesn’t seem to be expressed in the
documentation, since I’ve checked all the sections that seemed
relevant. I’m trying to make any attempts to press anything but a
device divert into touching it instead. So I’ve tried several variants
of a sentence to do this and can’t find the correct way to say it.

Using:
Instead of pressing [phrase], try touching it.

What I’ve tried for [phrase]:
something that is not a device
something which is not a device
something not a device
a thing that is not a device
a thing which is not a device
a thing not a device
anything but a device
anything not a device
anything that is not a device
anything which is not a device

I know some of these don’t work, but I figured I’d try them for
completeness. I can’t think of any more variations on this theme…how
do I do it? I assume the negative is the problem, but we can say things
like "a man who does not wear anything" (from section 5.5 of the
documentation), so why not this?

posted by admin in Uncategorized and have Comments (3)

[I7] Embedding I6 commands

According to the I7 documentation, you can define routines in I6
style by the following syntax:

Include (-
[ SayOuch; print "Ouch!"; ]
-)

That seems to work okay, (the generated .inf code includes this definition).
However, I can’t figure out how to call these routines from I7. For example,
suppose I wanted to call SayOuch() whenever I hit someone. I would think it
would be something like this:

    Before attacking someone: (- SayOuch(); -).

This should have the same effect as

    Before attacking someone: say "Ouch!".

But it doesn’t work. (It compiles to I6, but then the I6 doesn’t compile.)


Daryl McCullough
Ithaca, NY


NewsGuy.Com 30Gb $9.95 Carry Forward and On Demand Bandwidth

posted by admin in Uncategorized and have Comments (2)

I'm not worthy

In Graham’s white paper: Footnote 12 on page 19.

Well played, sir.  Well played.  I yield.

Adam

posted by admin in Uncategorized and have Comments (4)