Long-text passage issue

Twine Version: 2.9.0
Chapbook version: 2.1.0
Firefox version: 115.8.0esr (64 bit)

sorry if the terminology isn’t correct, but the issue is simple:

when entering a passage containing a long text, the page is rendered complete, but is viewed from the centre of instead of the top (I’m not sure if I explained well…)

of course, this forces the player to do a page up to start reading, and if the player don’t notice that he’s reading from somewhere in the middle, ends being seriously confused. and this is definitively NOT a good thing.

suggestions ?

Best regards from Italy,
dott. Piergiorgio.

1 Like

I just tested on a new project, with tons of Lorem Ipsum and it started at the top. Could you share your code to see what could affect viewing?

Chapbook.txt (3.1 KB)

it’s my IFComp entry… so I can’t share it.

Anyway, your lorem ipsum correctly starts from the top:

but, OTOH, snippets of code are allowed, so I think I have a lead: your lorem ipsum has:

:: Test {"position":"750,425","size":"100,100"}

and, exporting into twee, one of the problematic passages has:

:: **SPOILER** {"position":"1700,600","size":"100,100"}

best regards from Italy,
dott. Piergiorgio.

the Position element is where you see it on the Twine program (on the passage map). it doens’t influence the final project.

Can you dm me the file? that wouldnt be a public release this way and you’d still get help :slight_smile:

1 Like

@klembot I think there might be a bug with Chapbook.

When you go from one long passage (needing scrolling to read all) to another long one, the page doesn’t scroll back to the top, but only refreshes the text. So if you’re at the bottom of the first long passage, it will display the bottom of the second long passage (needing you to scroll back up the page)…

See this file: Chapbook.txt (3.1 KB)
Click on the Test link twice to see it happen.

In the meantime, in the JavaScript, this will do the trick (-ish*):
window.addEventListener('body-content-change', () => scrollTo(0,0));

*the transition is not super smooth.

1 Like

the trick do its work, and the transition is immediate. Thanks !

Best regards from Italy,
dott. Piergiorgio.

1 Like

I wonder if this is legacy from the “continuous scroll” format…

Twine is rendering the long text. When the player chooses, Twine renders the next page top to bottom (as if scrolling) and leaves focus at the bottom. This would make visual sense to the player if the previous passage were scrolling away and revealing the new one, but since it’s replacing what came before, it’s just leaving focus at the bottom of the new long passage text instead of returning to the top. It actually did “scroll” through the second page text, the player just didn’t notice it since it clears the screen.

It’s like how a printer that doesn’t paginate prints in order - page1, page2, page3, but when you grab the document page 3 is on top in the printer tray since that’s the last thing the device did in order.

I don’t know if Twine has or had a “more” scroll feature to pause screen-filling text with a prompt to continue, but that sort of makes sense if that’s how it’s building a page. Most Twine games generally have passages that fit mostly inside one screen and it’s only noticeable with multi-page text dumps.

Try this in the CSS and see if the scrolling is smoother or not.

html {
  scroll-behavior: smooth;

no, HAL, the issue is not one of scrolling, but one of what text is initially on screen.

let’s use for a moment the good ol’ 25 line text screen, and let’s say that the wall of text is 47 lines long.

Justly one expect that arriving at a passage, one see on its screen lines 1-25, then pressing page down the remaining line, 26-47.

The issue I have is that arriving at a passage one sees lines, say, 14-39, and this can either annoy (having to press page up first, then page down twice for reading the entire passage) or confuse the player (not realising that there’s lines above the apparent first line, missing a good chunk of text)

Hope this explain the issue, and
Best regards from Italy,
dott. Piergiorgio.

It was to accompany @manonamora’s comment of…

I thought she solved your issue, but the scrolling up part was maybe clunky.

Sorry if I confused the issue. If there is anything that doesn’t need solving, I’m your man! :wink:

1 Like

ok so, is solved, in the end…

Thanks to everyone, esp. Manon, and
Best regards from Italy,
dott. Piergiorgio.

1 Like

This is not a Twine issue, but a Chapbook one. Both SugarCube and Harlowe, by default, scroll back to the top without any issue (unless you messed around with the interface/CSS of the page).

This was not an issue in Chapbook 1.2.3 (i just tested it)


yea, is a 2.x issue, but I needed the new passage.from lookup for breaking an infinite backlink loop.

Best regards from Italy,
dott. Piergiorgio.

Just FYI, I believe the old Chapbook has a visited passage array you can access… and manipulate.

@manonamora I’m coming to this topic late, but if you could open an issue, that would be very helpful.

1 Like