• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

HTML5 Problem with Web Exports and window focus.

Banish

Member
I don't know how to explain it exactly. But I have a problem when I upload my web exports to places like Itch.io
What happens is, after the game first loads, sometimes you can't play/control it until after you refresh the page. Also if you click outside the game window, clicking inside the game window does not make it so you can control the game again.

You can see the problem first hand here.
 

Dan1

Member
I've had a very similar problem and found three things that seem to work:

1. Use this extension: https://github.com/Kodiqi/WindowFocus/blob/main/windowfocus.yymps
2. Create a "Click to focus" room at the beginning of the game, making the player click and focus the window on the game
3. Putting this: onclick="window.focus()" src="https://...... in the iframe on the website itself

I don't know what makes this combo work and if one of these three steps is pulling all the weight or if it's a combination of the three, but combined, it gets a working game: https://tydecon.games/#/cookies/ (made in 2.3.1)
 
This bug has been around for a while and renders the HTML5 export completely useless if you require a keyboard, has anyone submitted a bug report about it yet?
 

O.Stogden

Member
Strange, I haven't experienced this problem myself with HTML5.

Is there a function or something that causes it?
 
Top