Interactive Fiction_4 – Surroundings

Things
Some standard properties for things are:
  • edible(the player can eat it),
  • wearable(the player can wear it),
  • fixed in place (the player will not be able to take or move it)
  • lit (the object provides light).
The cookie is in the jar.  It is edible.
The baseball cap is in the mudroom. It is wearable.
The bed is in the bedroom.  It is fixed in place.
The glowstick is on the desk.  It is lit.
 .
Scenery
Scenery objects by default are always fixed in place and will NOT be mentioned separately when the player enters its location.  Their descriptions are only listed when they are examined.
The Foyer is a room. “This room is a boring place with only a large painting on the wall.”
The large painting is scenery in the Foyer. “The painting is huge: over ten feet tall and six feet wide. It depicts a hunting party that seems to have gone terribly wrong.”.
 .
Supporter
A supporter is any object that has the capability of having other objects placed on its surface. Supporters are, by default, fixed in place and will be mentioned separately when the player enters its location.
The Foyer is a room. “This room is a boring place.”
The coffee table is a supporter in the Foyer. The description is “This little table has been in your family for generations and you’ve always hated it.”
The cup is carried by the player.
 .
Here is how it will look (and behave) in play:
Foyer
This room is a boring place.
You can see a coffee table here.
>x table
This little table has been in your family for generations and you’ve always hated it.
>put cup on table
You put the cup on the coffee table.
 .
Properties for supporters are:
  • portable  (the supporter can be carried by the player)
  • enterable (the supporter can be sat on or stood on).

The bed is an enterable supporter in the guest room. The description of the bed is “The big recliner looks like it would be extremely comfortable to lie in.”.

Devices
Any object that can be switched on or off.

Devices are, by default, portable, switched off, and will be mentioned when the player enters its location.

Standard properties for devices are:
  • switched on
  • switched off (the default)

The water cooler is a device in the kitchen. It is switched on.

** The “carry out” rule in the next lesson will show you how to code so that things happen when a device is switched on or off.  **

Backdrop
This is a thing that is similar to the scenery object but can be in more than one location at a time. Things such as mountains in the distance, the sky, wind, smells, sounds, etc., would be good candidates for backdrops. Backdrops need to be mentioned in the room description (or elsewhere) as they will not be mentioned otherwise.

The Purple Moon is a backdrop. It is everywhere. “The purple moon seems to follow you everywhere.”
The fog is a backdrop. It is in the driveway, the backyard, and the meadow.  “The denseness of this fog makes walking treacherous.”

.
Objects that are part of other objects
Example, suppose we want to create a night stand that has a drawer (that can be opened and closed) that will contain an important key for the player to find. But, we do not want the player to be able to take the drawer itself.

The night stand is a supporter in the Bedroom. The description is “The night stand appears alone and small against the wall. It has one drawer.”.

The drawer is a closed openable container and part of the night stand. A green key is in the drawer.
.
Now the player will find a night stand that has a drawer that they can open and find a green key inside (which can be taken).
 .
Bonus
Creating new kinds of things
Often, we need to make many objects that have the same properties. For example, we may be creating a work that will have ten different chairs and six different tables. We can create new things by combining different kinds and/or properties. 
A chair is a kind of supporter that is enterable.
 .
Now we can use this “new chair kind to create anything that we might normally sit on:
The couch is a chair in the Living Room.
The stool is a chair in the Kitchen.
The park bench is a chair in the Meadow.
 .
Again, this technique can save you many key strokes and is easier to remember what a chair is than what an enterable supporter is.

____________________________________________________________________________________________________
ASSIGNMENT
After working through the above examples…

Using Inform 7 or www.playfic.com create a room that has:

something which is scenery
a supporter
a device (feel free to look at the next lesson and use the carry out rule)

**Include a description with each of the above.**

Copy and past your working code into notepad and hand in your code.

____________________________________________________________________________________________________

 
This resources is from –  http://www.hpiweb.com/newmedia/handouts/Decorating%20Your%20World.pdf  …. now a dead link.

 

Leave A Reply

Your email address will not be published. Required fields are marked *