Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for web #477

Open
TranquilMarmot opened this issue Jul 3, 2023 · 5 comments
Open

Add support for web #477

TranquilMarmot opened this issue Jul 3, 2023 · 5 comments
Labels
enhancement New feature or request topic:builds Concerning building from source topic:runtime Concerning runtime behavior (or its source code) topic:usage Concerning packaging, loading or settings

Comments

@TranquilMarmot
Copy link

Similar to #354 and #353, I wonder if it would be possible to support jolt on the web (HTML5 export)?

@github-actions github-actions bot added the needs triage Something that needs investigation label Jul 3, 2023
@mihe mihe added enhancement New feature or request topic:builds Concerning building from source topic:usage Concerning packaging, loading or settings topic:runtime Concerning runtime behavior (or its source code) and removed needs triage Something that needs investigation labels Jul 3, 2023
@mihe
Copy link
Contributor

mihe commented Jul 3, 2023

Thank you for the feature request.

Jolt does technically support web builds through JoltPhysics.js, but I haven't really explored what it would look like to make use of it from Godot Jolt, nor what loading extensions looks like for Godot's web exports.

I must admit that I'm not super keen on supporting this, which is why I didn't create an issue for it. Although the situation is certainly much better these days, browsers tend to have frustrating discrepancies that I'd rather not spend my time chasing down. Throwing Emscripten and WebAssembly into the mix will probably bring its own set of challenges as well, for both building and running Godot Jolt.

I'll leave this open to better gauge what the demand is for this, but for the time being this will not be on the roadmap.

However, if someone else with more experience with Emscripten and WebAssembly wants to do some exploratory work, to give me a better sense of how it all would work and what changes would be necessary, then I'd be willing to allocate some time for accommodating that.

@TranquilMarmot
Copy link
Author

Yeah, even reading Godot's docs on exporting for the web there are so many warnings 😅 It is definitely a somewhat painful thing to support right now.

@jrouwe
Copy link
Contributor

jrouwe commented Jul 7, 2023

I concur that supporting this is painful. I managed to make it work for Jolt, but the code, compile, debug loop is extremely slow. The debugger is almost unusable. I had to resort to printf debugging in many cases and even then it manages to not show the printfs. There are indeed bugs in browsers, e.g. jrouwe/JoltPhysics#577 where even the HelloWorld application doesn't work on macOS Safari.

@bikemurt
Copy link

Just chiming in here - not sure if there's been any more decisions regarding Jolt Physics and the web. One of the most frustrating things I'm dealing with right now is very basic collision shapes "jittering" unnecessarily with the vanilla physics engine. I'm using very basic shapes such as boxes and cylinders, and no matter how I tweak all the parameters, the physics engine just seems to do it wrong.

I've tested in Jolt Physics and it works with no errors whatsoever, but of course, I am developing for the web, hence my post...

Any advice? What possible avenues there are for people like me? I have built GDextension code for the web before, I'm curious how much more difficult it would be to do for Godot Jolt.

@mihe
Copy link
Contributor

mihe commented Mar 26, 2024

Any advice? What possible avenues there are for people like me? I have built GDextension code for the web before, I'm curious how much more difficult it would be to do for Godot Jolt.

Near-term I don't have any advice for you, unfortunately. I don't think it's trivial for anyone to just jump in and add web support to this extension, given the unfortunate complexity of CMake, as well as the stuff I've stacked on top of CMake.

Long-term it's looking likely that this extension will be merged into Godot as an official module, in which case web support will largely come "for free" as part of that porting process. I can't give you any timeline on that, but I'm hoping it's not too far away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request topic:builds Concerning building from source topic:runtime Concerning runtime behavior (or its source code) topic:usage Concerning packaging, loading or settings
Projects
None yet
Development

No branches or pull requests

4 participants