0 votes
by (120 points)

Hello! Working on my first Twine 2 Harlowe game. Everything else is in the title.

http://guilhem.club1.fr/guilhem/index.html

How can I get rid of this black screen? Is it normal? Do you see it?

Thx!

 

1 Answer

0 votes
by (159k points)

The cause of your issue is a simple one.

Harlowe 2's default theme (White text on a Black back-ground) is set by CSS contained within the head element of the HTML template file used by that story format. This allows that CSS to be applied early to the body and tw-story elements during the web-browser's render process. (even before the story format's JavaScript based engine has started)

Your replacement theme (Black Text on a White back-ground) is set by CSS contained within the project's Story Stylesheet, and unfortunately the contents of that passage needs to be processed by the story format's JavaScript engine before it becomes actual CSS that can be applied to the current page.

What you are seeing is the default theme, followed by a short delay while the JavaScript engines starts, followed by a short delay while the Story Stylesheet is processed into real CSS, finally followed by a short delay while this new CSS is applied to elements of the page.

The only real way to reduce that overall delay is to manually move the CSS of your new theme into the head element of the generated story HTML file, and it needs to appear later in the head element that Harlowe's default theme. This way your new theme will be applied as early in the render process as the default one is.

...