Because of my limited knowledge of Twine I suspect I overuse passages and resort to them when I really should be using macros like <<replace>>, <<linkreplace>> <<append>> etc.
The game I'm making now starts with the player locked in a single room, so even though there's only the one (locked) exit I'm still resorting to passages to handle the various objects in the room, and I began wondering late last night if the whole 'puzzle' of getting out of this locked room could, and should, be handled in a single passage?
It would be an absolute nightmare for me to take this on alone, as I need to handle things like different descriptions for return visits, items not being there if a player has already taken them, checking for variables etc. But at the same time it would be marvellous if a dozen passages could be reduced to one.
Is this how it should be done, ideally, or am I setting myself up for hours of frustration?
Comments
To put that another way, by default any changes made to the variable values within the current passage (both when it is initially displayed and via reader interaction with the passage) are not persisted in the History system until the next passage traversal. That passage traversal can include the current passage traversing to itself.
A Save stores the state of the variables as they were just before the current passage was display and it does not include any variable value changes done by the code contained in the current passage.
So as long as your story does not need to use the History system to Undo a reader's actions and does not need to Save the current state of it's variables then you can create it as a single passage with no passage traversal.
As I understand it, no passage traversal equals no History of the variables changing value(s), and the Save system stores the History.
Second, you can solve the save game issue another way, by putting the save game choice in its own distinct passage.
For example, rather than a link going directly to save, make it so that it's a passage link to an options screen, and save game can be accessed from there. Then you can include a back button in the options screen to return to where you were.
Also good to know I'm not being a noob by creating lots of passages.
The hardest thing I find is making sure each choice the player makes, has some kind of impact on proceedings. So often with these games you can blindly click the links, knowing full well it makes no difference whatsoever in the grand scale of things.
Shutting up now.