Two question about HTML games

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

My games aren’t running in Google Chrome. I could play they in Firefox (and they really work). How to fix that?

The other question is about the exported files. There is a way to optimize their sizes?

The most “compatible” way to export to HTML is to use the GLES2 renderer. If you’re still using Godot 3.0.6 then you’d have to update to Godot 3.1.1 for that and switch the renderer in the project settings (not only in the editor) to GLES2.

Anyway, there are some other things to mention. I.e. there are no GPU Particles so (at least for 3D) you’d need to use CPUParticles. Also you might have to reimport the image resources and adjust the project settings so they are compatible with GLES2.

I can tell at least that my GLES2 3D Project runs fairly fine on Firefox/Edge/Chrome. Even in the Chrome app on (decent) Android devices. Although the HTML performance on android is noticably slower compared to the Android export.

You can try for yourself here: Narrowboat Simulator - Try it

Can’t tell much about saving room. You might do your own customized build of the html export template. Also, you can save space by optimizing your textures, etc. (I.e. rescaling to lower resolutions) But that depends on your project.

wombatstampede | 2019-05-20 11:13

:bust_in_silhouette: Reply From: Calinou

To preview HTML5 projects in Chrome on the local filesystem, you need to start a local Web server to comply with its security policies. See the beginning of Exporting for the Web for more information.