Uploaded game has problems (fixed)

Hello all,
After working on my game for over 3 years now I finally uploaded it last night. It seems to be doing some funky stuff when I play it in the browser. Stuff it never did when I would play through, checking it in the editor.
I created the game offline...so, not sure if that has anything to do with it or not.

First issue I notice right away, is that every time I move from one room to another it adds in these lines.
( please see the image linked below)

https://i.postimg.cc/RVzqqCCz/lines01.jpg

I have no idea where they are coming from.

Second issue I noticed when playing a short way in...is that when entering a room...you meet a person that say's a certain thing. You leave the room and come back...this person is supposed to say something different. ( I use flags to do this) It works fine when testing it in the editor. However, now uploaded and in the browser, it repeats what was said the first time...adds one of those funky lines and then says the second thing.

As I said, these are just a couple things I have noticed so far. Any ideas of what may be going on, or how to fix it would be greatly appreciated.

Thx


I'm taking a look at the game now, and I can't work out what's going on. It looks like ClearScreen is behaving very oddly. I'll keep poking and see if I can figure it out.


OK… you have a turnscript called RmClear which calls HidePreviousTurnOutput. This interferes with the ClearScreen function (which works differently in Quest 5.8 and later), causing it to output a horizontal line instead of clearing the screen.

More in-depth explanation

As of Quest 5.8, clearing the screen doesn't actually remove previous content, it just hides it. The text is left on the page but invisible, so that you can use it for debugging (in the JS console, or using Pixie's transcript system).

So, what's happening (as far as I can guess from reading the code) is:

  1. ClearScreen is called
    a. A horizontal line is added, with class clearedAbove
    b. All .clearedAbove lines and everything above them is set to style clearedScreen
    c. A <style> tag is printed, which causes all .clearedScreen content to be invisible
  2. The output for the first turn is sent to the screen, and the player responds.
  3. Next turn, your turnscript calls HidePreviousTurnOutput
    a. This removes all content output so far
    b. It also removes the <style> tag added in step 1c
  4. ClearScreen is called again
    a. A horizontal line is added, with class clearedAbove
    b. All .clearedAbove lines and everything above them is set to style clearedScreen
    c. The <style> tag has already been added, so it isn't sent again
    d. The horizontal line is now visible, because the browser doesn't know that clearedScreen is supposed to be hidden
  5. Text for the second turn is output

My first suggestion would be to use `HidePreviousTurnOutput` **or** `ClearScreen`, but not both.

Alternatively, you could protect the style information by adding:

JS.eval("$('<style>').text('#divOutput > .clearedScreen { display: none; }').appendTo('head');")

to your UI Initialisation script.


Once updated with the code you gave ...It is working perfectly. No more lines and my flags are working as they should.
Thank you So very much for your help.

Again...I very much appreciate all the help so many here have given me throughout the years I was working on this.


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

Support

Forums