Any Plans To Improve HTML Export for Facebook Instant?

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

I accidentally stumbled across Godot after hunting around for game engines that could potentially be used to create Facebook Instant games, which is looking to be the next big thing in terms of casual mobile gaming and social gaming. I was delighted to see an engine with a rich GUI, flexibility, c# support and the ability to export to HTML. However I notice that there is limited support in your web builds. Facebook instant currently requires that games use canvases rather than webgl, and that they can seamlessly run within mobile browsers. They also require the game files to be around 1mb.

Is this something that we can look forward to with Godot? I know unity really suffered with this due to the flexibility of the system making it really difficult to efficiently port games to the web, is this something you guys are struggling with too due to the flexibility of Godot?

:bust_in_silhouette: Reply From: Calinou

Facebook instant currently requires that games use canvases rather than webgl

As Godot currently only uses OpenGL ES for rendering (for 2D and 3D), it wouldn’t make sense to use canvas rendering (which is less efficient, and only has very limited 3D capabilities which aren’t hardware-accelerated).

They also require the game files to be around 1mb.

There is only so much that can be done to make a full-blown game engine smaller. (As you said, Unity suffers from the same problems when exported to HTML5.)

The WebAssembly module currently is around 3 MB when sent gzipped (which should be configured in the Web server you’re using). If supported by your Web server, Brotli compression can help bring its size further down, but it would be unlikely to bring its size below 2.5 MB.

Disabling 3D support would help make it a bit smaller, but it would still be far above 1 MB when transferred.