| 5.4. Background, Memory, and Knowledge |
In IF, as in all interactive storytelling, an essential problem is that the player does not begin the game knowing everything that the player character should, and so may implausibly bumble through situations that the player character should be quite comfortable in. If the player character has friends, an unusual job, a home or environment we're not familiar with, a secret past, these will all be a blank to the player.
Some games get around this by making the player character an amnesiac, or positioning him as a newcomer to a strange world in which his disorientation is explicable; but there are stories that cannot be told this way, and so we need other methods of getting the player to know what the player character already does.
Our first opportunity to inform the player about the player character is in the opening text of a game:
When play begins:
say "The funeral is exactly a month ago now, but Elise's shoes are still on the shoe tree."
We may also want to write descriptions of objects to give extra background information the first time the player encounters them:
A thing can be examined or unexamined. A thing is usually unexamined. After examining something: now the noun is examined; continue the action.
The description of the newspaper is "A rolled-up newspaper[if unexamined], and thus a symbol of your newly-single state: Elise always had it open and the Local Metro section next to your plate by the time you got out of the shower[end if]."
To expand on this, we could give the player a THINK ABOUT or REMEMBER command, with which he can call up information about people he meets or references he encounters in descriptions, so that he could (for instance) next type REMEMBER ELISE. Merlin demonstrates one way to implement a character with memory; One of Those Mornings puts a twist on this by letting the player FIND things which he knows his character possessed at some time before the game started.
Once the game is under way, we may also want the player character's perspective to change as a result of what he's encountered. It is sometimes reasonable to let the player understand references to characters who are currently off-stage, as in Puncak Jaya; or respond to actions differently depending on what the player has previously done, as in Tense Boxing; or change the way we describe objects in light of new knowledge about them, as in Zero.
Casino Banale takes that last idea much further, with a whole system of facts that can be narrated to the player in a somewhat flexible but interdependent order, as the player looks at relevant objects or notices them in room descriptions.
See Looking for more ways to change the description of a room depending on player experience
| Example Merlin A REMEMBER command which accepts any text and looks up a response in a table of recollections. | |
| Example Puncak Jaya When a character is not visible, responding to such commands as EXAMINE PETER and PETER, HELLO with a short note that the person in question is no longer visible. | |
| Example Tense Boxing An overview of all the variations of past and present tenses, and how they might be used. | |
In a work of interactive fiction that involves many new discoveries, we might want to change the way we narrate room descriptions and describe objects as the player learns new information.
One approach to this is to create a model of the facts we want the player to find out, and attach some narrative text to each. When a fact becomes relevant to the story, that narrative text is shown to the player. So:
"Casino Banale"
Section 1 - Procedure
First we create the concept of facts, and the idea that facts can make some things more important than others.
A fact is a kind of thing. A fact can be known or unknown. A fact can be ready to learn or hidden. A fact has some text called the narration.
Definition: a thing is narratively significant if it conveys an interesting fact.
Definition: a thing is narratively dull if it is not narratively significant.
Conveyance relates various things to various facts. The verb to convey (it conveys, they convey, it conveyed, it is conveyed, it is conveying) implies the conveyance relation.
Definition: a fact is interesting if it is unknown and it is ready to learn.
Now, we also need a way to tell Inform to introduce certain new facts when the right previous ones have been introduced. We'll create a "following" relation, according to which a new fact can be told to the player when the player has already learned all the facts it follows. This way, we can simulate the effect of putting together several pieces of evidence to come to a conclusion:
Following relates various facts to various facts. The verb to follow (it follows, they follow, it followed, it is followed, it is following) implies the following relation.
To say (new fact - a fact):
say "[narration of the new fact]";
now the new fact is known;
repeat with possible outcome running through facts which follow the new fact:
if every fact which is followed by possible outcome is known:
now the possible outcome is ready to learn.
Next we need a way for the game to introduce these new facts. Let's say we want them to come up when the player examines something appropriate, or sees it in the room:
After examining something which conveys an interesting fact (called discovery):
say "[discovery][paragraph break]".
After choosing notable locale objects:
repeat through the Table of Locale Priorities:
if the notable-object entry is narratively significant:
set the locale priority of the notable-object entry to 1.
For writing a paragraph about a narratively significant thing (called item):
now the item is mentioned;
let chosen fact be a random interesting fact which is conveyed by the item;
say "[chosen fact][paragraph break]".
The "after choosing notable locale objects" line here handles things so that any interesting conclusions we want to draw are always given first, followed by the less interesting description.
And finally, we need to give the player a little evidence to piece together:
Section 2 - Scenario
The Casino is a room.
Frince is a man in the Casino. The description is "Frince is a friend of yours -- if you reckon friendship on the same terms that one reckons a cat as a pet. He spends time with you when he wants to, but if your wishes or convenience ever run counter to a whim of his, it's the whim that wins. Always. [paragraph break]He's also wearing a somewhat ludicrous shirt."
Frince wears a ludicrous shirt. The description of the ludicrous shirt is "Fine white fabric with satiny white pinstripes: it's that expensive, effeminate look that Frince is so fond of, and which -- combined with his name -- gives people completely the wrong idea about him."
Tim is a man in the Casino. The description is "You don't know Tim well. Kind of wall-flowerish. The only thing that seems to excite him is craps."
Penny is a woman in the Casino. The description is "Loud. Brash. Hot, probably, if you can look past the loud and brash."
Rule for writing a paragraph about a narratively dull person:
if the number of unmentioned narratively dull people is 1:
let is-are-n be "is";
otherwise:
let is-are-n be "are";
say "[A list of unmentioned narratively dull people] [is-are-n] [one of]watching the croupier[or]following the spin of the roulette[or]chattering[at random][one of] breathlessly[or] impatiently[or][at random]."
Penny-annoying is a fact.
It is ready to learn.
The narration is "[if looking]Penny grimaces at you-- [end if]Penny is the same woman who stepped on your toe in the buffet line. The third time, she blurted, 'You have big shoes, don't you?'"
Penny conveys penny-annoying.
lipstick-smudges is a fact.
It is ready to learn.
The narration is "There are a couple of smudges of coral-colored lipstick on the collar."
The ludicrous shirt conveys lipstick-smudges.
penny-wears-coral is a fact.
It follows penny-annoying.
The narration is "[if looking]Penny catches your eye again. [end if]The bright coral lipstick was really not a wise choice."
Penny conveys penny-wears-coral.
Affair-with-penny is a fact.
It follows lipstick-smudges and penny-wears-coral.
The narration is "You avoid [if examining Frince]his[otherwise]Frince's[end if] eye. You need some time to adjust to the image of him making out with Penny in a storage closet before you can talk to him without appalled giggling."
Frince conveys affair-with-Penny.
Test me with "x penny / x frince / x shirt / look".
|