version 2/110308 by Mike Ciul
Example: *** Living in the Past - Using the Remembering extension and implementing flashbacks. This will tell the player where they last saw some things if it is compiled to glulx.
"Living in the Past"
Include Remembering by Aaron Reed.
Include Lost Items by Mike Ciul.
Chapter 1 - Things that come and go
[We are going to have a flashback. Some things only belong to the present time, and other things only belong to the past. We want to keep track of that so we will have the appropriate "notice absence" message.]
A thing can be past or present.
The Street is a room. In the Street is a flower. The flower is losable and familiar.
The Park is east of the Street.
Amelia is a losable past woman.
Chapter 2 - The Passage of Time
[Let's demonstrate what happens when an object moves unexpectedly.]
After looking for the first time:
say "You are startled by a strong gust of wind.";
move the flower to the Park.
[The Remembering extension assumes that things stay where you put them, so it would, tell you that you saw it in the Street, even though you haven't seen it since it left the Park. Lost Items corrects for this situation by keeping track of where you saw losable things as well as people.]
[Now let's demonstrate what happens when the time frame changes and lots of things move around:]
Flashback is a scene. Flashback begins when smelling the flower in the Park. Flashback ends when kissing Amelia.
Instead of smelling the flower in the Park:
say "You breathe deep, and the fragrance takes you back to a happier time...";
When flashback begins:
remove the flower from play;
Now Amelia is in the park;
Instead of kissing Amelia:
say "You hold her close, but before your lips touch, the vision fades...";
When flashback ends:
Remove Amelia from play;
Now the flower is in the park;
Chapter 3 - Reporting Lost and Missing Items
Section 1 - Making sure something is truly lost
[In this scenario, "lost" doesn't mean misplaced or stolen, it means it doesn't belong to the current time frame]
Did we lose a present thing when flashback is not happening: we didn't.
Did we lose a past thing when flashback is happening: we didn't.
Section 1 - Customized messages for different time periods
For noticing absence of a past thing (called memento) when flashback is not happening:
say "Though your heart aches, you cannot bring [the memento] back.";
For noticing absence of a present thing when flashback is happening:
say "That is something from another time.";
Section 3 - Noticing absence instead of remembering, sometimes
[This demonstrates how we might sometimes change the behavior of remembering to mimic the "noticing absence" message, so for example "smell" and "examine" would have identical results.]
Instead of remembering something lost (called item) when the noun is not a person:
carry out the noticing absence activity with item;
For printing the name of the location when remembering:
say "right here"
Chapter 4 - Testing
test me with "x flower/smell flower/e/x amelia/smell flower/x flower/smell flower/kiss amelia/g/x amelia"