This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

Hi, all.
I've developed an small game for a ONG and we want to host in its web.
All works quite Ok but closing the browser tab when exiting the game. Also I was not able to start the game in fullscreen, but this is another war.

Honestly, we have no idea about webs, html neither java, so we got the godot exported files and put in a subdomain, to directly serving the game.

I use JavaScript.eval("window.close()")q, but it only freezes the game, don't close the tab.

I've started a local server with python and the behaviour confuse me a lot:
- If I run from the HTML icon in the editor, works perfectly and close the tab.
- If I export to html5 and put the files in the server main directory and type localhost in Firefox, exiting the game doesn't work.

Here you have the temporal game link (Sorry the language, the ONG and myself are from Spain. Last button, "Salir", means quit):
http://noa.sindrome5p.org/

So, should we change something in Godot, or the exported files to have the correct behaviour?

Thanks in advance.

Godot version 3.5
in Engine by (131 points)

1 Answer

0 votes

I wrote something about my experience with html-export here:
I switched from the "eval" system to the new godot-js bridge, there are more possibilites, find a nice introduction here.

by (73 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.