Reimplement Single-Threading Option #7897
FartFish
started this conversation in
Engine Core
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The requirement of SharedArrayBuffers, and by extension Cross Origin Isolation is fairly easily solved on certain websites like itch.io or NewGrounds through the simple check of a box on their website, that enables the option for you.
For other HTML platforms... it isn't so simple. Activating COI may interfere with other background processes, advertisements, etc -- activating COI just isn't an option for these platforms. This means that many platforms (e.g. CoolMathGames, ArmorGames, GameJolt, etc) are currently unable to host any Godot 4 HTML games, either because they have yet to make enabling COI an option, or they simply can't.
For most devs, this isn't necessarily an issue -- most devs who publish HTML builds do so on itch and/or NG. However, for devs attempting to publish HTML builds to other platforms for reasons such as outreach, profit, etc, this becomes a large issue as other platforms become non-options. Expanding reach using multiple platforms is impossible, profit from either licenses for and/or advertisements from HTML game websites is impossible, etc.
There are solutions, but they do not work in every case -- for example, the HTML-based solution and the Godot COI Serviceworker plugin, its Godot plugin counterpart, do not work with embeds / iframes, which sort of doesn't solve the root problem when most game portals use iframes.
Single-Threading was part of Godot 3, but has yet to be implemented in Godot 4, because Godot 4 was "...largely rewritten... to make heavy use of threads" -- it simply hasn't been reimplemented yet. I think reimplementation of single-threading would benefit the engine, as it would enable devs to publish HTML builds on game portals that don't and/or can't make use of COI.
Some may point out that eventually COI will likely be supported by other necessary processes such that it won't be a problem. However, this may be far-off -- how long will it take for platforms to make their programs work with COI? Months? Years? Godot 4 has been out for half a year at the time of writing, but these platforms haven't made any such move to change -- there's really no telling, and until either they make this change or Godot reimplements single-threading, Godot devs will be unable to expand outside of the select few platforms that can enable COI.
Beta Was this translation helpful? Give feedback.
All reactions