Hide room

How to make a room totally hidden from the player before a certain event happens?

2 Likes

What do you mean by “hidden”, exactly?

The player doesn’t have access to a specific room before a certain event happens.

I gave an attempt at coding something for this using Inform 7, your mileage may vary :slightly_smiling_face:

The scene consists of a Library and a Hidden Tower. There is no connection between the Library or the Hidden Tower. If the player uses a magic wand found after searching a desk in the library they can teleport between the rooms.

Magic Wand is a thing.

Library is a room.  The description of the Library is "This is a very old library with many hand bound books shelved in ancient bookcases.".  The old desk is in the Library. The description is "A old wooden desk strewn with books papers and various items.".
	
Hidden Tower is a room.  The description of the Hidden Tower is "This is a Tower with no apparent entry way or exit.  You can see a forest far below you through a small window.".

Instead of searching the old desk:
	say "As you hunt among the many books you find a magic wand made from an old tree limb.";
	Now the player carries the Magic Wand.
	
Using is an action applying to one thing.
Understand "use [something]" as using.

Instead of using the wand in the Library:
	say "You are suddenly teleported to another location!";
	now the player is in Hidden Tower.

Instead of using the wand in the Hidden Tower:
	say "You are suddenly teleported to another location!";
	now the player is in Library.

Here is how the gameplay for that looks:

Library
This is a very old library with many hand bound books shelved in ancient bookcases.

You can see an old desk here.

>n. s. e. w.
You can't go that way.

You can't go that way.

You can't go that way.

You can't go that way.

>search desk.  use wand.
As you hunt among the many books you find a magic wand made from an old tree limb.

You are suddenly teleported to another location!

Hidden Tower
This is a Tower with no apparent entry way or exit.  You can see a forest far below you through a small window.

>n. s. e. w.
You can't go that way.

You can't go that way.

You can't go that way.

You can't go that way.

>use wand
You are suddenly teleported to another location!

Library
This is a very old library with many hand bound books shelved in ancient bookcases.

You can see an old desk here.

Alternatively this post dynamically maps rooms based on game events, making them accessible or not depending on the user actions.

2 Likes

As an alternative to teleporting you can also change map connections. Check out “Prisoner’s dilemma” for an example of adding or rewritting map directions:

http://inform7.com/book/WI_3_26.html#e36
http://inform7.com/book/RB_3_2.html

However, if you want to modify doors that connect rooms, rather than room to room connectiions, then you cannot create, move, or change the door connections. Instead, try the Easy Doors extension:

1 Like