scrollToEnd()

K.V.

How does everyone think scrollToEnd() should behave?

It currently skips to the bottom of any text on the screen (as I'm sure you all know). I don't like this for numerous reasons. The main issue is that it forces most authors into clearing the screen at regular intervals, which perturbs me to no end. I'm old. I can't remember all of the prose which has printed during play, and, if I'm playing a good game, I'll need to refer to some of that prose later in the game to solve some puzzles. (Or I might just feel like going back and re-reading a section or two, if it's well-written.)

I think it should scroll to the beginning of the current output, like this:


I added this line to game.inituserinterface:

JS.eval (" function scrollToEnd() {    var scrollTo = _animateScroll ? beginningOfCurrentTurnScrollPosition - 50 - $(\"#gamePanelSpacer\").height() : $(document).height();    var currentScrollTop = Math.max($(\"body\").scrollTop(), $(\"html\").scrollTop());    if (scrollTo > currentScrollTop) {        var maxScrollTop = $(document).height() - $(window).height();        if (scrollTo > maxScrollTop) scrollTo = maxScrollTop;        var distance = scrollTo - currentScrollTop;        var duration = _animateScroll ? distance / 0.4 : 1;        if (duration>2000) duration=2000;        $(\"body,html\").stop().animate({ scrollTop: scrollTo }, duration, \"easeInOutCubic\");    }    $(\"#txtCommand\").focus();};")

The bit of code I removed had a note which stated that the bit of code I removed was needed to make some browsers behave properly. I was wondering how long ago this was... (Maybe those browsers have been updated and no longer have this issue? (Just wishful thinking.))


Thoughts?

Suggestions?


K.V.

I forgot to mention that the classic parser games appear to clear the screen sometimes, but they are usually just adding a screenful of blank lines, then adding the text, which produces the same effect. The only difference being we can still scroll up to see the complete text. (Play a Z-code game in Frotz in your console to witness this.)


...and it's really not about the screen being cleared. Not really...

It's just off-putting when a large chunk of text scrolls past. I'm sure many an eyebrow has been raised while scrolling back up to read what just printed.


That would be a brilliant fix! I always hate it when that happens. I know authors are not trying to much up their stories, but this sort of thing frustrates me to no end.


K.V.

I know authors are not trying to muck up their stories

I believe this is true.

We want be sure our text is at least seen, even if we can't guarantee it will be read. So, we clear the screen and nest the prose inside of wait blocks. (Sometimes there are multiple 'Continue...' links and calls to ClearScreen within what should be one normal section of text.)


So, we clear the screen and nest the prose inside of wait blocks.

That's how I roll.


I have always used "Continue..." links to the next page.
Is it necessary to clear the screen when using wait scripts? Like K.V. said, some prefer to be able to look back at where they've come from. I'd hate to take that away from my readers/players.

EDIT:
This seems to work, but it is S-L-O-W...

  <object name="Page4">
    <inherit name="script" />
    <description type="string"></description>
    <script type="script">
      msg ("Tons and tons and tonnes of text.")
      wait {
        msg ("More text.")
        wait {
          msg ("And finally some more text.")
          MovePlayer (Page1)
        }
      }
    </script>
    <object name="player">
      <inherit name="defaultplayer" />
    </object>
  </object>

K.V.

Is it necessary to clear the screen when using wait scripts?

Nah, but I have a theory: We're already adding extra code to make our text display correctly, and we decide we may as well add a ClearScreen while we're at it. (It definitely makes the current output hard to miss, after all. ...which is the current goal. Plus, it does make everything look all nice and tidy.)


I'd hate to take that away from my readers/players.

Ah...

I just recently realized that my games are not actually mine. I merely set things up, then the player's imagination takes over. The NPCs "look" and "sound" different to each player. The same goes for the locations. (This especially concerns me, because I suck descriptively!)

...and the puzzles...

Guys and gals, let me tell ya' (if ya' don't already know), you think your puzzle makes sense because you came up with it. You know the solution. If you have puzzles in your game (and we hope that you do), beta-testers are your (and our) only hope! Please, please, please, get some feedback! Give those testers a walkthrough (or at least a list of steps), so they can easily test everything out properly. Most testers wouldn't use the walkthrough during their first play-through unless there was an unsolvable puzzle anyway, so it's not like it would ruin the game for anyone who was seriously playing it. Plus, quite a few players never even finish text adventures without clues or a solution. I think this is especially true when someone is testing a game, because they are trying to finish the game quickly so they can provide their feedback.

...but I digress.


Clearing the screen isn't always a bad thing. Sometimes it's for the greater good.

Plus, it really won't matter once Quest 5.8 is released, because it looks like we'll have a new Javascript function: showScrollback(), which will display the entire text in a dialog popup, even the stuff that was wiped out during a ClearScreen.

NOTE: Anything cleared by ClearMenu will NOT show up when calling showScrollback(). (I just realized that while typing this.)

To use this function, I'd probably create a command with this for the script:

JS.showScrollback()


Quest 5.8 will also have a Transcript feature.

SCRIPT enables the transcript, just like it does in classic text adventures.

SCRIPT OFF disables.

We will be able to enter SHOW SCRIPT to view the transcript in a dialog popup (which will include a 'Print' button).

If an author doesn't want the player to be able to do this, simply add game.notranscript = true to the start script. If a player enters any transcript commands, it would return, "this story has no transcript feature."


Wait...

What were we talking about, again?


K.V.

PS

If you are clearing the screen because you like to clear the screen, I'm not downing your game. I'm talking about the games when you can tell that the screen is only being cleared to properly display large chunks of text.


showScrollback(), which will display the entire text in a dialog popup, even the stuff that was wiped out during a ClearScreen.

Awesome feature!!!

//A frequent ClearScreen user.


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums