- Edited
K_REY_C the game will never load in a mobile browser
An HTML5 game that I uploaded to itch.io will run in one mobile browser but not in another. I don't have a solution.
K_REY_C the game will never load in a mobile browser
An HTML5 game that I uploaded to itch.io will run in one mobile browser but not in another. I don't have a solution.
DaveTheCoder Thank you for responding. Good to know I'm not alone here.
Sadly unsatisfying. Is Godot simply unable to do simple browser-based 3D games reliably?
Perhaps I missed it here, but don't you need to enable a setting in itch.io to allow mobile play? In 'Frame options', select 'Mobile Friendly'.
spaceyjase I do indeed have that checked. I've also had it unchecked and tried the SharedArrayBuffer support on and off. I think what I'm trying to determine is if this is an itch.io thing (like a limitation of some sort), or a Godot problem, or both ― in order to figure out the best way to work around it.
At the end of the day I'd like to get this working for mobile browsers. It's uncomplicated (click to roll) and it's possible Godot is overkill for this, but my understanding is that this should work via Godot (and I'm hopeful it will).
Thanks for the tips! I'm sure I've missed something!
K_REY_C what doesn’t work here, it crashes while loading? You might see something in the browser console if there are errors; is it only on itch.io or does it fail when running in the browser locally (or self-hosted)?
I mean, this generally works in 3.5 (especially so) and 4.x so must be something specific to the project.
spaceyjase It just has a the black, dark gray loading bar, which transitions to a dark gray spinning wheel that just never seems to load anything on a mobile browser (but it works fine on desktop). I ran the project locally via $ python3 -m http.server
in the folder and it ran on the desktop browser just fine, then I connected via a phone with mobile browser over the local network and saw the same behavior, so it's probably not an itch thing, though I'm unclear on what maybe works better.
I'm using Godot 3.5.2 to remove any 4.x questions, but I'm still getting the same result.
At a loss for what to try next. I'll probably just work through the docs again, but I'm not sure where else to look. Very open to ideas!
Have you experimented with the rendering settings, such as GLES2 vs. GLES3?
DaveTheCoder I agree, likely some device feature missing. Still worth pursuing debugging the device to see what’s going on: https://developer.chrome.com/docs/devtools/remote-debugging/
(assuming Android hardware)
DaveTheCoder indeed. Sadly no change.
spaceyjase thank you. I'll try this.
This is the error I'm getting when launching the game on a mobile browser. (Will investigate, just tagging here for context if someone else happens upon this thread).
So, something about not finding web assembly or the browser not supporting it (is this a common thing?)
It's in the folder I exported for HTML5:
The docs suggest application type needs to be specific, so I've checked that and it reads as fine.
$ file --mime-type *.wasm
index.wasm: application/wasm
index.js:9:8876 is as follows:
Out of my depth here. Any additional advice appreciated.
Could be a security issue? What hardware is this, and have you tried other phones (have you tried other godot games) to confirm it isn’t your tech?
If this is hosted on itch.io, fancy posting the link?
spaceyjase I've messed with it a bit (upload, fail, delete, etc.) so let me get it back up at some point here. I did, however, try about 10+ other projects on itch.io that had the exact same errors on mobile browser only, so it's either a very common problem, or something where it's really simple for someone trying to make a mobile friendly export in Godot fail at it (and I ended up exporting probably 25+ different versions with various settings, options, etc. for upload at two different platforms - itch.io and gotm.io - as well as locally over the network, and they all seemed to fail in the same way on mobile).
Because my "game" is so simple and uncomplex I'm really surprised to find this so challenging to work out, but we press onward!
spaceyjase Here's one version of the export running: https://gotm.io/kreyc/br
That works fine, it’s your hardware (Pixel phone tested).
spaceyjase Very strange. Initially I'd used my Pixel 7a and a co-workers Android Samsung (which also didn't work). I expanded to the rest of my office and outside and only a very old, out-of-date samsung device partially worked (it loaded dice and would click, but no image textures, so they rendered pink). Every other phone, from iphones, to androids did not load on our end (including in multiple locations, so I don't believe individual networking issues came into play).
Can anyone else test the above on their mobile device? This is extremely odd.
K_REY_C note that iOS devices are unsupported currently.
To be fair, the docs state that for maximum compatibility with HTML exports, you should use 3.x.
https://docs.godotengine.org/en/stable/tutorials/export/exporting_for_web.html
spaceyjase Yeah. Using 3.x for that reason (was originally 4).