Inform 7; Even plainer English: Dark rooms, Vehicles, and Scenes.

I don’t know about you all, but while working on my creative project I found the rulebook/guide to be less than helpful at times. Though I eventually figured out how to make some of the things that I wanted to do work, I figured I’d explain a few of them here step by step with simpler terms and explanations than the guide.

Dark rooms:

As Jeremy Douglass shares in his essay regarding dark rooms, Enlightening IF, “You can’t see anything; you can do very little indeed. All objects except those in your inventory are out of scope, unreachable, as if non-existent.”

There are ways to lighten up dark rooms, however; whether by turning a light on in the room, or by having some item on hand that provides light.

The first method: Using a device, such as a lantern, flashlight, or match, is significantly easier than creating a light within the room.

           To begin, create the object and identify it within Inform7 as a device.

                        e.g. The lantern is a device in the cave entrance. 

           Inform7 usually assumes that devices are “on” normally. So make sure that you label it as off if you want the player to have to turn it on.

                      e.g. The lantern is switched off. 

                                Note: The syntax here is rather picky as the word “switched” is necessary or it won’t understand what you’re saying.

          In order for the lantern to provide it light, you have to tell it to provide light of course and can be accomplished via an “after” phrase.

                    e.g. After switching on the lantern, now the lantern is lit. 

Note:

  • Again, the syntax is picky. switching on and lit are necessary unless you’ve defined otherwise with separate code. Also, be wary of word order, as “After the lantern is switched on” will not work. A verb ending in “ing” is necessary in order for Inform to understand.

While the device is on, any room the player is in that was previously dark, or that was coded as dark, will be illuminated.

The second method: In order to create a light-switch/light that can be turned on within a room, a few things need to happen.

First, you must create a dark room. This is done very easily and only requires that you label the room as “dark.”

                 e.g. The cave is a dark room.

Now, if the player enters the cave he’ll get the message, “It is pitch dark, and you can’t see a thing,” and as Douglass explains, won’t actually have anything in scope, but you can make it so.

In order to place an object in scope, you must first create the object. In this case, I’ll use matches. Then, use the following,

                e.g. After deciding the scope of the player when the location is cave:
                                                 place the matches in scope.

The player must also have created a source in the room for light, like a torch on the wall. Then, use the following to light the object within the room.

               e.g. Instead of  taking the matches:
                                      Now the torch is lit;
                                     say “You strike a match against a nearby rock and light the torch on the wall, luckily for you it was freshly soaked in gasoline.”
 

I made a short game, that can be accessed by clicking on this sentence, which has both cases.

A few notes:

  • Devices can also work for turning on lights, as shown in the game.
  • While in a dark room, if the creator of the game placed any objects in scope, read the description or try typing in the command, scope.
  • It is a good idea to fix light sources in place if you intend to have a light that can turn on and off.
  • It is easy to make words such as “light-switch” be understood and made interact-able via others: 
                            Understand “light” and “switch” as the light-switch.

Vehicles:

Creating a vehicle is actually very simple.  In fact, Inform already understands what a vehicle is!

e.g. In the frontyard is a vehicle called the sedan. 

Inform will understand that the character can get inside of “the sedan” and can then move around while inside of it. Other common syntax works for vehicles as well, such as describing.

Basic Scene Creation:

In order to create a scene, or, some event that occurs based on time passing or a certain event happening, the event must be described as such.

   e.g. The Play is a scene. 

Then, a condition must be met in order for the scene to begin.

e.g. The Play beings when the player is in the theater for 5 turns. 

To define what happens in a scene, simply put When [the scene] begins: and then on a new line, begin defining.

           e.g. When The Play begins:
                         say “The actors come on stage and perform their show for you. You are astounded.”

Ending the scene is exactly the same, only the words ends and ending must be used.

             e.g. When The Play ends:
                         say “You clap.”
               The Play ends when the player is in the theater for 5 turns.              
 

Here is an example of a scene.

A few notes:

  • If you plan on listing time or turns for scene length, keep in mind that Inform counts both simultaneously. Therefore, if the scene starts in 2 turns, and you want the chances to last for 2 turns, make sure that it ends after 4 turns.
  • Within the scene, you can apply as much or as little change as you desire.

Hope this is helpful!

Optimizing room descriptions and object lists in Inform 7

Once you start building games in Inform 7, you may notice that the basic process of describing a room and then putting things in it will default to a somewhat rigid or mechanical output. So a common question I get is, “How do I hide things”? Or, “How do I get rid of that long list of items?” I’ve given various bits of advice for different games and situations, but since this is such a common question, I thought I’d summarize some common situations I’ve seen and methods for dealing with them. In preparing these snippets, I’ve put together a small game in my Playfic account, so if you’d prefer to skip to the final product you can play it there. Otherwise, read on!

[Read more...]

Thinking outside the box

Everytime I sit down to work on something in Inform7, I get this image of myself at my own pannel at ComicCon, answering questions from ravenous fans about my amazing game, “Faction 11″.

I’m using Inform to explore the world of a story I orignially had in mind for a novel. I’ve never written science fiction before, and I needed all of the resources I could get my hands on to try and flesh out my new universe. I’m using Inform to explore the world I’ve created, and using the map function to get a graphic idea of where things are located physically. It’s working kind of brilliantly.

The map function is magnificent in its own right, because I find this method of mapping to be the easiest when planning an Inform story. Plus, it gives me a list of objects in each room, so I can make sure everything is where its supposed to be.

After coding the game, I love getting a chance to play it. The coding and the playing allow me to explore character actions and plot points I may not have thought of before. This method of brainstorming for a story gives me the chance to see what details are necessary when telling a story, expecially when foreshadowing. If I know that a code is needed to enter a room, I know I have to plant the code in the world at some point beforehand, where I know the player will be able to find it. This same logic transfers nicely when I’m writing the story in traditional form, because I get a sense of when I should reveal certain information to the reader. I pretty much love everything about working with Inform.

I plan on creating a game, a hypertext story, and perhaps another electronic medium (twitterature?!) to explore every facet of “Faction 11″. Not only is elit a marvelous tool to use when writing t

Inform 7 Help

Here are some tutorials I’ve found helpful for using Inform7:

http://if1.home.comcast.net/~if1/inform_7.htm

http://newmedia.hpiweb.com/

And the Inform 7 handbook:

http://www.musicwords.net/if/InformHandbook.pdf