Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

[Harlowe] Keeping the previous passage on the screen?

Can anyone think of a way of not erasing the screen when you move to a new passage? Instead, keeping the previous text and adding the new one at the end, creating a continuous flow of text.

Of course, this can be easily done in-passage, but you would lose the easy tools for seeing bifurcations and paths that Twine provides. I can also think of a complex mechanism in which all passages are actually displayed inside another passage that the player never actually leaves. Probably doable, but probably with lots of caveats.

So, do you know any simple way of simply not erasing the screen when printing a new passage? Thanks!

Comments

  • The only Story Format designed to work the way you want is Jonah which comes with Twine 1.

    There are a number of techniques you can use to try and make the other story formats appear the way you want but the all have the same major problem and that is that any assignments (set macros) within those previously displayed passages will be executed again when you redisplay those previously displayed passages.
  • Probably not worth the difficulty, I guess. Although it would be nice if Harlowe allowed both behaviours and made it possible to choose one with some kind of flag.
  • Menti wrote: »
    Probably not worth the difficulty, I guess. Although it would be nice if Harlowe allowed both behaviours and made it possible to choose one with some kind of flag.
    It is a little more complex than just changing the way passages are displayed, it also effects how History works, how the variable state of each Passage is handled among other things.

    In some sense the Story Format would need to have two different engines built into it, like a Hybrid Car does. And like a Hybrid Car it would make the maintenance / enhancement of the story format more complex for its developer/mechanic.

    It would make more sense to develop a End-less Page story format that supported Twine 2.
  • edited March 2016
    I attach a prototype that I wrote to test an idea.

    *How it works*

    There is an "main" passage that prints two empty hooks, one for description and another for options. Then it displays the "loop" passage.

    "Loop" displays two passages: the current description and the current options. These passages do not print text, but set variables, and afterwards the loop prints these variables inside the hooks, showing the game text.

    When you click an option, your current passage variable gets changed to the destination passage and the loop passage is displayed again. The options hook is replaced, but the text hook is appended to, keeping all the previous text on screen.

    So the whole game would be played inside the same passage.

    *Problem I found*

    Savegames. This game has no history and I'm perfectly okay with that, in fact it's a feature I wanted to have. But we need savegames so that the player can close the game and go back.

    I included a savegame and load mechanism, but it doesn't seem to work: I close the game in turn 10, reopen it, load, and it's back to turn 1. I 'm not very sure of what happens exactly after a game is loaded.
  • I apologize to posting to a thread that's tagged as "answered" but I feel like there's something of value to add. So yea, I've been trying to pull a Jonah in Twine 2, and here's the easiest thing I can think of.

    I use the following as the actual clickable links. This just displays passage within the previous passage, as OP suggested.
    (link: "Clickable link text")[(display: "Target passage")]
    

    To make use of Twine 2's nice connector arrows in the editor, I put the following immediately after the link/display commands.
    [[ ->Target passage]]
    
    There's a space before the arrow. In the text the space doesn't actually show up, but Twine recognizes there as being a link between the passages and will draw an arrow in the editor.

    The first problem with this approach is multiple choices. If you had "choice one" and "choice two" in your text, and the reader clicks "choice one", it will effectively replace the words "choice one" with the content of the target passage, and it will display it before the "choice two" text. Meaning, when readers get to the end of the target passage, "choice two" will still show up and will be clickable.

    My getto solution to this is to place the following in the content of the target passage:
    (replace: "choice two")[]
    
    There's nothing between the square brackets. This effectively just gets rid of the words. Where I have multiple choices for readers to make, in each of the target passages, I write a replace command for each choice that is not the one that led to the particular target passage. The effect is that it eliminates the words and prevents the reader from being able to "remake" that choice again.

    I have no idea how this works with saves and loads. Sorry.
  • edited March 2016
    If the Reader is not navigating from one passage to another then there is no History.

    (save-game:) saves the name of the current passage and the state of all the story's variables as they were just before the contents of the current passage was processed.

    This means that when you do a (load-game:) of the "saved passage" all of the Other passages you displayed using justMANGO's link/display method will disappear because the save does not know about them.

    You would need to navigate a passage before doing the save and use $variables to conditional show the Other passages (as well as the link/display) for justMANGO's to have some chance of working if the ability of using (save-game:) is needed.

    As I have previously stated, if you want End-less page then I suggest you use Twine 1's Jonah story format.
  • edited March 2016
    Thanks for thinking about this, although I'm not pursuing it anymore.

    But I'm intrigued by this:
    (save-game:) saves the name of the current passage and the state of all the story's variables as they were just before the contents of the current passage was processed.

    A mere two hours ago I fixed a bug in which saving a game at the end of a passage caused duplicated text when I loaded the game. The passage added a value to an array, then the savegame was saved with that value. When loading, the array was loaded with that value already included, and then the loaded passage added it again, ending up with a duplicated value in the array. To fix it I had to move (save-game:) into the header, before the passage did anything.

    Maybe it's worth noting that in my engine the bug-causing (save-game:) was inside (live:) and then inside (display:).
Sign In or Register to comment.