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!

Run from the Zombies

Here is my creative project,

http://playfic.com/games/ashleyohhh7/run-from-the-zombies

 

I chose to create my project through inform 7, because after seeing other examples in class I felt it was the platform I could most easily navigate.  I needed to start out with a simple idea, people trapped in a house. But why were they trapped? I admit I fell into a bit of a cliche, that the would was being taken over by a zombie invasion. The idea of my game was basic, the couple was locked in their house, and in order to survive they must find the key to make a run for it.

 

When it came to actually writing the code for my game, I did have a lot of trouble initially. Inform didnt seem to like anything I was writing, and I was constantly getting the error message. However, once I began to understand how it wanted things written, things got easier. I started to have fun with creating objects, and the player getting to read the descriptions of them.

 

There are many things I would still change about my game. I wish I knew how to make it more complex, I still couldnt figure out how to get my characters to respond to the players by speaking. I also wish the key would have been a bit more difficult to find, rather than just by simply navigating the rooms.

 

Overall, for my first work of interactive fiction, I dont think I did too bad. I was excited just that the game worked, but if I ever use inform again I now feel more confident in being able to add in more details.

Creating a creative project.

Before we began looking at the different programs used to make electronic literature, it never once occurred to me how much time and effort needs to be dedicated to making even the simplest form of electronic literature. As I began creating my own project using Inform 7, I quickly realized how difficult the task of creating a text adventure could be.  Every single action, thought, etc needs to be stated, even if it seems unimportant or obvious to you. One wrong or missing piece of text could prevent your text adventure from working correctly.  The text adventure I created was very simple, yet I still spent hours planning and testing the work before it was ready to be released.  I couldn’t even imagine all the effort that is put into other,more elaborate works of electronic literature.

The text adventure I created is called “Island Adventure.”  My game begins on a shipwrecked island,and the purpose of the game is to find the way off the island. Originally I wanted to do something entirely different with the text adventure, but having little prior experience with Inform 7 prevented me from doing so.  After multiple attempts, I was never able to figure out how to tell Inform 7 to do certain things I wanted it to do, so I had to change many things around.

Kudos to everyone who dedicated time and effort into making these works of electronic literature.  I can now say I know from experience just how hard it is to create one.

Anyways, you can try out my game on Playfic.  The URL is:

http://playfic.com/games/hholden88888/island-adventure