It's always starting at the bottom

reginadolce
13 Oct 2017, 03:54

Hey new to this game software...and coding in general....as a matter a fact I do little to no coding when I do these games....working on a simple text based adventure game and the pages keeps going down to the links immediately. I'm wondering if there is a setting I have on that I can't find to change this?
or even if i need to do something more advanced?


K.V.
13 Oct 2017, 04:22

Hello.

Could you paste your game's entire code in a post? (If it isn't terribly big...)


jmnevil54
13 Oct 2017, 04:34

The page link may be before the script/you may have done something to change the page.


mrangel
13 Oct 2017, 10:55

I've always found when playing Quest games online that if there is too much text to fit in the window at once it will scroll to the bottom when the text appears, then up to the top of that turn's text, then down to the bottom again. And then I have to scroll up manually to actually read what's happened. It's worse playing on the Android browser, when it can go up-down-up-down-up-down twenty to thirty times before you can do anything.

No idea how you'd go about changing that, sorry.


jmnevil54
13 Oct 2017, 13:55

@mrangel
I have the same problem. I play one of my games on my kindle, and the key letter thing bounces until I can size out, or in. I have a keyboard (Dad thought I would need it), but I don't use it...
But most people don't buy keyboards for their kindle.
Sorry. I don't know who is in charge of Developing text games for different devices.


hegemonkhan
13 Oct 2017, 17:33

if you don't mind the design... you can use the 'ClearScreen' (and the 'wait') Function(s), as an alternative/round-about design method for handling this issue.

// code with my cluttering comment lines:

ClearScreen // clears the screen
msg ("blah blah blah") // your message displayment/prompt
wait { // this will require a keyboard key to be pressed or clicking with mouse on its blue 'continue' hyperlink, before it does its nested script ('ClearScreen'), allowing you to read the message displayment/prompt before it clear the screen
  ClearScreen // clear the screen
}

code without my cluttering comment lines:

ClearScreen
msg ("blah blah blah")
wait {
  ClearScreen
}

reginadolce
13 Oct 2017, 20:24

thanks hegemonkhan! ill try the clear screen thing! see if it works.


hegemonkhan
14 Oct 2017, 02:31

to do Functions in the GUI/Editor:


Text Adventure:

run as script -> add new script -> 'scripts' section/category -> 'call function' Script -> (see below)

call function TYPE_IN_THE_NAME_OF_YOUR_FUNCTION_INSTEAD_OF_THIS With parameters add (only need to add parameters for when the function has/needs data inputs, which are stored into 'Parameter' VARIABLES for it/you to use in the Function's scripting)


Game Book:

'WHATEVER' Page -> 'Page' Tab -> Page Type: [script] or [script + text]

run as script -> add new script -> 'scripts' section/category -> 'call function' Script -> (see below, to put in the Function manually, otherwise, just look for it as one of the script options --- I don't know the GUI/Editor that well --- I think the 'ClearScreen' and 'wait' Functions are both script options, but if not, then you can manually put them in with the below)

call function TYPE_IN_THE_NAME_OF_YOUR_FUNCTION_INSTEAD_OF_THIS With parameters add (only need to add parameters for when the function has/needs data inputs, which are stored into 'Parameter' VARIABLES for it/you to use in the Function's scripting)


the 'wait' and 'ClearScreen' are two built-in Functions, but you can use any Function (built-in or custom:self-made)

examples:

call function wait With parameters add (do NOT add anything)

call function ClearScreen With parameters add (do NOT add anything)


K.V.
15 Oct 2017, 12:03

Hello.

HK is looking out for you.

Check this out:
http://textadventures.co.uk/forum/quest/topic/ik0dbblaq0o5fdqq7nuwia/js-function-to-find-the-last-divoutputalign-in-a-saved-game-solved#70665d46-9a75-4ce3-9dd7-3f65a0959a90


jmnevil54
15 Oct 2017, 21:58

I don't understand you two.

What device are you playing on? That may effect it. As mentioned, playing on a mobile device causes problems. In my experience, it works on my mom's IPhone, but it turns my Kindle into an absolute, unplayable mess. (Even if I still play it through determination.)

Also, yeah, it always scrolls to the bottom. You will probably have to shorten it.


K.V.
16 Oct 2017, 02:45

I've got the first Kindle Fire, and its browser is not very good at all.

It especially doesn't work very well with anything on this site.

The main page is awkward, and the Play page is just awful.

A Quest game plays okay unless I hold the Kindle vertically, which is how I prefer to hold my devices while reading for extended periods of time.

When holding the Kindle vertically, you can barely see the left edge of the panes, and, if you scroll over, it only effects the gameContent element. You can't get to the panes to even read them.

The example game I posted scrolls up and down twice on my Kindle Fire. After that,it sticks at the bottom, focused on the text input field. You definitely do have to scroll back up, but nothing really goes haywire in my Kindle.

NOTE: Scrolling to the bottom to focus on the text input field is a feature of Quest. We would normally not want the player to have to scroll down to enter their command.


The example game does scroll to the top and stick correctly for me on the latest versions of ALL OF THESE BROWSERS:

  • Chrome (desktop and Android)
  • Chromium
  • Internet Explorer
  • Edge, Firefox
  • Safari (iPhone6)
  • Whatever the default browser in a Samsung Galaxy S6 is called.

This is the line of code:

SetTimeout (2) {
  JS.eval ("$('html, body').stop().animate({scrollTop: 0}, 'slow');")
}

I have the following Galaxy devices: S3, S6, Tab2.

It doesn't bounce up and down at all on any of these for me. Perhaps I should add more text and try it again.


EDIT

I made a second version with longer text, and it still works smoothly for me in every device and browser EXCEPT the Kindle Fire HD's Silk browser. (The DuckDuckGO Search & Stories app does run the game perfectly fine in the Kindle Fire HD. No panes are displayed, though.)


Here's a link to that second example: http://textadventures.co.uk/games/view/5sp2_p9ipu20edpvuklsww/scroll-to-top2


jmnevil54
16 Oct 2017, 03:36

I have a Kindle 6 or 7 or something. The website looks fine. And in general I have absolutely no problem with the browser. The internet actually works better than my mom's IPhone and my old Google tablets... Not a sponsorship.... But yes, I have problems playing games, and I have the same problem as mrangel.


K.V.
16 Oct 2017, 03:52

jmne,

Get this from the App store on your Kindle: DuckDuckGO Search & Stories

I had to search for "browser" to find it. Searching for "duckduck" or just "duck" didn't bring it up (for some strange reason).

You can go to this site (the textadventures site) from within that app.

The scrolling works properly, but the panes are not displayed.

(The cover images for the games aren't displayed, either.)

NOTE: I am using the very first Kindle Fire HD. This may not work for all of them. But I load the game, it starts at the bottom, then scrolls up to the top and sticks.

Here's a video:

https://drive.google.com/file/d/0BzGPNwPjOx3TZ3UwQWZRZVQ0TTg/view?usp=sharing


jmnevil54
16 Oct 2017, 03:55

I'll consider it.