0 votes

I'm trying to make a snake clone that is playable on mobile on HTML so I can upload it to itch.io and to a GitHub page. I am using GLES2 and I have added swipe support to control the snake. It doesn't load when I try to play it on my phone but it works fine on my computer.

https://mariothedog.itch.io/python (Password is "snake")

asked Oct 5, 2019 in Engine by Mariothedog (154 points)

I can play it on my device, even though itch.io displays a message saying that the game "is not designed for my device". The controls sure are clunky, but the point is that I can run the game. Check with itch.io to see what requirements they have.
It might also be the case that you need to enable the "for Mobile" checkbox in the export settings of Godot, in the HTML export panel.
Also, try enabling and disabling cookies and/or javascript. Last but not least, try to enable a setting on your phone which makes it seem like it's a desktop requesting access from websites. Android definitely has this feature, I am not sure about iOS though.
See if that helps and tell me so I can turn this comment to an answer.

That message appears because I forgot to enable the "Mobile Friendly" option on Itch.io but enabling it didn't have any effect when I tried playing it. Itch.io doesn't have any mobile requirements from what I could find. I already have the "for Mobile" box ticked in the HTML export settings. Enabling/Disabling cookies didn't seem to change anything. Disabling Javascript causes the message "HTML5 canvas appears to be unsupported in the current browser. Please try updating or use a different browser" on GitHub and just doesn't let me press "Run Game" on itch.io. I found an option to enable access to the Desktop version of the site on IOS but it didn't change anything sadly.

1 Answer

0 votes

I had this problem too: mine was caused by "WebGL not available" for the Webview on mobile. WebGL depends on device/android-version/webview-engine.
You could test on other -more modern- devices...
If you can debug your html5 export there should be a Hint for "WebGL not available"-Error in your console if it's caused by this.

answered Oct 5, 2019 by Captain.Susuwatari (31 points)

I couldn't find a way to debug it on my phone but on my computer the console outputted:
WebGL: INVALID_OPERATION: framebufferRenderbuffer: renderbuffer has never been bound
on both the GitHub version and the itch.io version.
I tried playing it on a more modern phone which worked so I think it's just my phone being slow.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.