Godot for the web
2024-01-03
Godot is an awesome game engine that boast supports for multiple platforms, including the web (i.e. HTML). As a lover of game jams, I believe the web is the best platform to make people play short experimental games/demos such as the ones done in most game jams.
The problem
Imagine my surprise when I did some experiments and got this error when playing on an iphone:

Turns out the web is kind of a weird platform with lots of different features. Godot relays on a bunch of those, and support amongst browsers is not universal.
Godot 4.2 requires SharedArrayBuffer and WebGL 2.0.
What these are is not in scope for this post, but Safari has trouble supporting these.
Even on the Godot documentation there is an explicit notice recommending not using Godot 4 for web exports.
The solution
What if you want the maximum compatibility for your game? Well, there is a workaround, just use Godot 3.
For bigger projects it might be more of a hassle, but for me it's completely justified for quick demos such as game jams.
Few things to keep in mind
- Make sure that you set the render to
GLES2. - Always browse the Godot 3 docs, and not 4.
As for the future, there is a pull request to make Godot work in single thread mode, which should help the builds work on iOS. But for now, we are stuck with Godot 3.