Teleportation by thinking, reading or remembering

Does anyone have advice for how to teleport by having the player either read a page from a book, or think about/remember something that is not in the room? I’m treating rooms as if they were points in time. I’ve tried a bunch of different things, right now I’m stuck on this:

Remembering is an action applying to one thing.
Understand “Remember [room]” as remembering.

Instead of remembering July 2007: say “You remember it like it was yesterday…”; now the player is in July 2007.

2 Likes

The thing is, I don’t think you want to move the player character from time-room to time-room. Unless fancy time travel shenanigans are involved, if I pick up a wrench in 2019 before I start remembering 2007, I shouldn’t be carrying the wrench back in 2007.

So the thing to do is instead to have a copy of the player character in each time room. We can associate each version of the character with the room where it belongs, like this:

A room has a person called contemporary.

December is a room.

Decemberself is a person in December. The contemporary of December is Decemberself. The player is Decemberself.

January is a room.

Januaryself is a person in January. The contemporary of January is Januaryself.

April is a room.

Aprilself is a person in April. The contemporary of April is Aprilself.

So now each “self” is its own individual, who can have its own inventory, a unique description (which will print when you EXAMINE ME), and any number of other properties that don’t extend to the other selves.

It’s (probably) important to declare immediately that the player is the contemporary of the default timeframe, so that you can return to being that person when necessary.

The remembering action then needs to understand the name of a room, figure out who the contemporary of that room is, and pass control of the player to that person. (Also, we don’t want to re-become our current self if we happen to remember the current moment. I think.)


Remembering is an action applying to one thing. Understand "remember [any room]" as remembering.

Instead of remembering:
	say "You remember it like it was yesterday…[paragraph break]";
	now the player is the contemporary of the noun;
	try looking.

Before remembering:
	if the contemporary of the noun is the player:
		say "You are remembering that right now." instead.

True blue codemasters will say that the “Before remembering” rule should be “Check remembering” instead, but I couldn’t make it work as a check rule. So, tell me what I’m doing wrong, true blue codemasters!

(I think you could also/instead say that a region has “a person called contemporary,” and have the remember action turn you into the contemporary of that region. That way, you could have multiple rooms within a timeframe for the player to explore, and whenever you remembered that timeframe, you’d show up wherever that self left off.)

3 Likes

Hi AN! Welcome in.

You’ve posted in the Choice-based IF section, for systems like Twine, where a player’s options are spelled out in a list. Yet from the fragment of code you’ve posted, It looks as though you’re using Inform 7. It’s usually a good idea to say explicitly what system you’re using, as that helps people give more practical advice.

It seems like the “After” section of an action is what you need to fiddle with.
Anyhow, here’s a mini-example in I7: hope it helps.

"Zap" by "Testa"

[from example 292, the trouble with printing]

A thing has some text called printing. The printing of a thing is usually "blank".

Understand the command "read" as something new. Understand "read [something]" as reading. Reading is an action applying to one thing, requiring light. 

Check reading:
	if the printing of the noun is "blank", say "Nothing is written on [the noun]." instead.
	
Carry out reading:
	say "You open [the noun] and begin reading: [printing of the noun][line break]".
	
Report reading: do nothing.
	

The library is a room. "Bookshelves stuffed with books from every era line the walls."

The reading table is scenery in the library.

The ancient tome is on the reading table. The description of the ancient tome is "A thick book, its leather cover polished over the years by many hands."

The printing of the ancient tome is "At the first glance the text appears to be unintelligible gibberish, but once you begin to read you cannot stop. The jagged letterforms impale you; your gaze is dragged down the page, right to left, left to right, like a dog shaking a dead rat; against your will, your throat fashions unhuman sounds."

After reading the ancient tome:
	say "You feel a tearing, a dislocation... ZAP![paragraph break]";
	move the player to the dungeon of the soul;

The dungeon of the soul is a room. "Stark, high walls circle around you, hideously decorated with marks that might be writing, or then again possibly merely a desperate attempt at escape. There appears to be no exit."

Feel free to play around with it. The Inform documentation is full of examples that you’re encouraged to paste into your own code (or a little throw-away thing) so you can monkey around with the system and see how it works.

2 Likes

Thank you! This helped a lot!

1 Like

Ooh thank you for letting me know, just getting used to the sections and the lingo. Oh I haven’t heard of this after feature, I can’t wait to try it! Thank you!

You’re welcome! I’ve learned so much by lurking and looking over the shoulders of others here, that it’s nice to give back a little. I’ve always found this a very friendly group.

Interesting debate, because I’m exploring this very concept, but on Inform 6, but the idea is applicable also on I7 (my coding on I7 is on hold) because is based on the good ol’ xyzzy (in practice, remember works as xyzzy, teleporting (flashbacking ?) to the past memory)

Best regards from Italy,
dott. Piergiorgio.