Godot 4.0 and HTML5 export

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By mdg6496

Does Godot 4.0 currently support to export to html5 so I can open the game as index.html by hosting on IIS,Apache or Node.js web server etc? (node.js in my case)

  • i have remote server (Linode) and would like to host some html5 game on this server

I am searching from google but most of answers are related to godot 3.X version and the only successful one I saw was using python as web server (python -m httpserver :8000)

also the post suggested that html5 export would only work for standard version (not mono which uses C#)

I;ve tried to export html5 using godot 4 but would keep fail

:bust_in_silhouette: Reply From: hello64

Godot 4.0 does not support HTML5 export yet, as the OpenGL renderer,
Websites are very delicate in performance and in result, cannot run large things such as COD, or Warzone.

My Best reccomendation is too switch the Render Engine to OpenGL 2.0 for HTML5

I am not %100 Sure this will work, I Am only 8 months new to Godot, So i hope other Godot Veterans also answer this.

:bust_in_silhouette: Reply From: Mustafalou

İt does support, maybe not for big games.
Yesterday İ tried to export in html 5. İ used nginx, you could also use apache or whatever. The only thing u have to do is to set the headers.
İn nginx the configuration file should look like this :
listen 80;
server_name localhost;
root ;
location /{
index .html;
add_header Cross-Origin-Embedder-Policy “credentialless”;
add_header Cross-Origin-Opener-Policy “same-origin”;
Tried with godot 4.0 and nginx the latest stable version.
İf u try it tell me if it works, if it doesn’t work. Look to the error logs.

are you saying 4.0 mono version can be exported?