[4.0b3 - 4.0RC2] Black Screen and Screen Tearing on Android
Asked Answered
A

25

0

No matter what I do, exporting a project from 4.x doesn't seem to want to work on Android. I've tried exporting my game project, and exporting a new, nearly-blank project with only a sprite in the middle of the screen. The result is always the same: the Godot splash shows, then there's a black screen.

I've tested on my mobile and on my Retroid Pocket 2+. On my mobile, the black screen persists until I close the game. On the Retroid, it always crashes after about two seconds of black screen.

I can export Godot 3.x games onto these devices without issue.

I've tried changing the rendering method between mobile and gl_compatibility. I've tried different scaling modes. In the export settings, I've made sure both ARM architecture libraries - v7 and v8 - are included. Still, the same result in every case.

Has anyone gotten their 4.x games running on Android? Is there something I'm missing? Or is 4.x just not compatible with many Android devices in its current state?

Action answered 10/11, 2022 at 15:24 Comment(0)
A
0

I just tested an export from Godot 4.0 Release Candidate 3, and the screen tearing is no longer occuring on the Retroid Pocket 2+!

Re-tested on the Huawei P10 Lite, too, and it's still no longer occuring on that, either.

This exhausts the Android devices I'm able to test on. Hopefully no-one else is still having the issue on theirs! I encourage reporting it in this thread or on Github if you are.

Action answered 23/2, 2023 at 12:18 Comment(0)
G
0

Has anyone gotten their 4.x games running on Android?

I've exported a very simple 4.0-beta2 project to Android, and it worked properly. The device is a Samsung Galaxy S9. I just tried it again using Godot 4.0-beta4, and it worked.

My notes from the first test:
Godot 4.0-beta2 testing
Exported project Angles_g4b1 to Android. I had to populate two fields in Editor Settings >> General >> Export >> Android: Android SDK Path (/home/---/Android/Sdk) and Debug Keystore (/home/---/Godot/debug.keystore). I obtained those values from Editor Settings in Godot 3.5.1. The project ran correctly on Android, although the display was too small. I fixed that by changing Project Settings >> General >> Display >> Window >> Stretch >> Mode from "disabled" to "viewport".

Granese answered 10/11, 2022 at 19:3 Comment(0)
A
0

Granese Thanks for the input! I did already do everything in your notes, but haven't tried it in Godot 4 beta 4 yet - I didn't realise the new build was out. I guess watching their Twitter feed isn't enough to keep up with that.

In case upgrading to beta 4 doesn't fix the issue, which version of Android does your Galaxy S9 run? My phone is a Huawei P10 Lite running Android 8.0. The Retroid Pocket 2+ runs Android 9.

EDIT
Well, I updated to 4.0 beta 4, and the result is still exactly the same on both devices.

Action answered 13/11, 2022 at 10:47 Comment(0)
B
0

Action According to GSMArena the Galaxy S9 was released with Android 8.0 but is "upgradable" to 10 so I assume Granese is updated to latest available for it.

Bromley answered 13/11, 2022 at 11:45 Comment(0)
G
0

Action which version of Android does your Galaxy S9 run?

My phone is running Android 10.

If you want to upload a minimal project that fails on Android, I could try exporting it to Android. I don't know if that would help.

Or you could try using adb and logcat to debug it.
https://godotforums.org/d/31588-app-in-mobile-crashes-after-i-try-to-open-the-app-on-the-second-time/2

Granese answered 13/11, 2022 at 16:12 Comment(0)
A
0

Granese It certainly couldn't hurt to try. It'd be good extra insight to try running my build on Android 10 - which I don't have access to myself - and to try exporting from my project on your machine.

I've made a zip file with both my Android build and the project folder in it.

Thanks for offering.

(EDIT
(Holy crap, that's a big preview box!!!)

Action answered 14/11, 2022 at 14:19 Comment(0)
G
0

When I uploaded a .zip to a post here (after the forum software had been upgraded), there was no preview at all. I had to edit the post and change an image tag to a plain link so that the .zip could be downloaded.

I imported your project into Godot 4.0-beta4, connected my computer to my phone with a USB cable and clicked the Android icon in Godot. The project exported to the phone and runs properly, i.e. it displays the 5.png image just like the Godot editor.

I also tried installing your .apk on the phone from the command line, and that worked too:
adb install snowys_android_test.apk

When I first imported the project into Godot, there was a warning dialog about res://5.png. I clicked the close-button, and the project ran normally within the editor.

There are other warning messages:

modules/gltf/register_types.cpp:76 - Blend file import is enabled in the project settings, but no Blender path is configured in the editor settings. Blend files will not be imported.
modules/gltf/register_types.cpp:100 - FBX file import is enabled in the project settings, but no FBX2glTF path is configured in the editor settings. FBX files will not be imported.

But none of the warnings seem to affect anything.

Granese answered 14/11, 2022 at 19:9 Comment(0)
G
0

For further testing, you could try this. It's a simple 4.0-beta4 project I made with a Sprite and a Label. The project folder includes an exported .apk.

https://www.dropbox.com/s/t0y1jki2xajmaln/test_for_snowy.zip?dl=0

Granese answered 14/11, 2022 at 20:10 Comment(0)
B
0

Granese When I uploaded a .zip to a post here (after the forum software had been upgraded), there was no preview at all. I had to edit the post and change an image tag to a plain link so that the .zip could be downloaded.

It's an auto-embed form a google drive share link. zip files usually get presented as a directory listing and the download link can be found when visiting the page opened by pressing the icon to the top right. But in this case the zip for whatever reason can't be presented as a directory listing of the contents so it's offering the download link directly.

Bromley answered 14/11, 2022 at 21:46 Comment(0)
A
0

Granese Thanks for all your help so far.

I first downloaded your project and APK, and tried installing the APK on my devices. Strangely, it failed to even so much as install on either of them.

The project loaded fine in my Godot editor (those warnings seem to happen a lot when importing projects - I've been getting them the whole time I've been using the Godot 4 beta) and I was able to test it on my PC. Exporting an APK and installing it onto my Android devices worked, but the same as with my own projects, running it didn't - I had the same black screen on both. As before, on the Retroid, the Godot splash was shown, then a moment of black screen, and then there was a crash.

This is still helpful, though, as it's helped to narrow down the issue. As far as I can see, either Godot 4 is currently exporting files that my particular Android devices - or perhaps versions of the Android software below Android 10 - don't like, or there is something horribly wrong with my Godot settings or installation. But, if the latter is the case, I find it strange that your APK refuses to install on my devices, and that my APK installs and runs just fine on yours, so I'm inclined to believe the exports are being picky about which devices or Android versions they want to play ball with.

In short, I'm pretty sure at this point that it's just a compatibility issue.

I'm not sure we're going to be able to get any further unless somebody who knows a lot more about Godot 4's Android compatibility finds the thread and chips in. For now, I'm just going to soldier on with my project, accept that I won't be testing it on my Retroid any time soon, and hope future versions of Godot 4 come with better Android compatibility (or someone is able to work out what's wrong here, if it's not that).

Again, thanks, Dave, for all of your help.

Action answered 15/11, 2022 at 11:29 Comment(0)
B
0

Action either Godot 4 is currently exporting files that my particular Android devices - or perhaps versions of the Android software below Android 10

I bet on this being the case. As godot 4 matures maybe android 8 & 9 become supported, but I suspect the core developers might consider these old enough to be legacy.

Bromley answered 15/11, 2022 at 14:7 Comment(0)
G
0

Action I'm not sure we're going to be able to get any further unless somebody who knows a lot more about Godot 4's Android compatibility finds the thread and chips in.

You could also look through the posted issues for possible clues.
https://github.com/godotengine/godot/issues?page=2&q=is%3Aissue+android+in%3Atitle

If you don't find anything relevant, you could post a new issue, and include a minimal reproduction project and a link to this thread.

Granese answered 15/11, 2022 at 18:18 Comment(0)
A
0

Bromley I really hope that's not the case. The Retroid Pocket 2+ is just one of many "retro handhelds" that run on Android - often older versions, presumably for lightness - which are becoming very popular. Not supporting Android 8 and 9 would be locking Godot 4 off from those devices, not to mention people who just have older phones, which is a whole other, probably much bigger potential player base.

Though looking at the issues on GitHub, as mentioned below, it looks like the devs are investigating the issue and trying to find solutions.

Granese Yeah, good call. I didn't create a new issue, as others are clearly having similar problems - I added a brief explanation and a link to this thread into a post in https://github.com/godotengine/godot/issues/63943

Action answered 16/11, 2022 at 12:21 Comment(0)
B
0

Action Not supporting Android 8 and 9 would be locking Godot 4 off from those devices

Yes, but the idea is likely for Godot 3 to see some continued support for at least a few years after Godot 4 gets a stable release.

Bromley answered 16/11, 2022 at 12:35 Comment(0)
A
0

Update: after updating to Godot 4.0 beta 5, the issue still persists, with no change.

EDIT
Progress, though. If I switch the renderer to OpenGL, rather than crashing, it now gives this error on my Retroid:

EDIT
And the same on my phone.

While it's still not working, it at least feels like a step forwards.

Action answered 17/11, 2022 at 11:13 Comment(0)
A
0

Update: exported from Godot 4.0 beta 7, the issue is back to being a black screen following the Godot splash, this time on both devices - the game no longer crashes on the Pocket 2+, but there are no visuals. I'll test again once I've added some sound effects to find out whether the game is actually running amidst the infinite darkness.

Action answered 2/12, 2022 at 13:26 Comment(0)
M
0

This page seems to indicate that Vulkan was available starting with Android 7.0
https://developer.android.com/ndk/guides/graphics/getting-started

However, that does not guarantee that your particular device has a SoC with a GPU that supports Vulkan, and, additionally, a Vulkan compatible graphics driver.

All those things would need to be current for it to work. I've found some devices from even a few years ago don't support OpenGL ES3, so you can forget Vulkan.

Download the app GPU Info, and find the model number of the CPU/GPU (usually one unit, the SoC). Then put that into this website: https://www.notebookcheck.net

It will tell you which OpenGL/Vulkan versions are supported.

Modification answered 2/12, 2022 at 14:6 Comment(0)
A
0

Modification Yup, OpenGL ES3 had issues on these devices exporting from Godot 3.x, too, and I had to use ES2, or there would be visual errors. At this point, I'm just reporting my findings in the hopes that it might help other people having similar issues, and that better backwards compatibility for software and hardware used by these popular devices - particularly the Android-based retro handhelds - will be included in future Godot 4.x releases.

Action answered 3/12, 2022 at 12:3 Comment(0)
M
0

I have a RG552, which does support GLES 2/3 and Vulkan. But it's on the high end of retro handhelds, I think it cost over $200 when I bought it.

I tried one of my GLES3 demos and it works, not very fast, but it loaded without glitches. I didn't try Vulkan, cause I was having problems exporting. But I tried Vulkan on some emulators, and it worked.

Modification answered 3/12, 2022 at 12:21 Comment(0)
A
0

Modification It certainly seems very hit and miss at the moment as to which devices happen to have the right gubbins to run what Godot 4's putting out. It's unfortunate, but I'm just gonna sit tight and wait to test my project on Android if and when a build comes out that works on my devices.

As for GLES3, on the Pocket 2+, exported from Godot 3.x, I was having a weird screen tearing issue. where one half of the screen was lagging about ten or twenty frames behind the other. GLES2 worked just fine - as well as on PC, with the li'l project I had at the time - but ideally, I'd like to be able to stick to Godot 4 moving forward, since that's the direction support is moving in in the long term, so that's what I'm slightly stubbornly building my "big" game in.

Action answered 4/12, 2022 at 13:18 Comment(0)
M
0

Honestly, I'm not sure what the best idea is. Godot 3.x is very stable and well supported. Godot 4.0 is somewhat okay on desktop, but there are still lots of glitches and crashes with the editor. And I'm considering mobile and/or web for my game, and the support right now is not even usable. It may be 6 months, maybe a year, before it is solid and production ready. It could be a good investment, if you are working on something in the 1 year time frame, but it could also be a lot of headache and risk when 3.x works fine right now. I'm not sure what the right answer is.

Modification answered 4/12, 2022 at 13:29 Comment(0)
A
0

Modification Yeah, pretty much my thoughts exactly. I decided to go with 4.x, even while it's in beta, because I'm banking on that long-term support, and because it's where things are inevitably going to be moving to sooner or later, so I might as well get used to the new paradigm now. Besides, I've been dropping in occasional feedback and small feature/improvement proposals, so I feel like I'm contributing in some small ways, too. Whether or not 4.x is the best choice for my game, only time will tell.

Action answered 6/12, 2022 at 11:37 Comment(0)
M
0

Yeah, I understand. This is why I have been experimenting with Godot 4.0, and I already managed to fix one thing (small contribution for getting newer Xbox controllers working on Linux). So I think that is good, because the more people that use 4.0 beta, the faster the bugs will get fixed. But I also worry mainly about the Vulkan support. On desktop it's okay, Vulkan has been supported well for almost 8 years. But on mobile it is a different story, especially when you consider old or low-end devices (particularly internationally, in the US many people have newer phones). For me, I am trying to do a high end 3D mobile game with console-like graphics, so you need a newer phone anyhow. But if it was like a 2D pixel art game or something, I wouldn't risk it since Godot 3.x can handle that fine.

Modification answered 6/12, 2022 at 13:8 Comment(0)
A
0

Success! I tested an export from 4.0b8, and there is now a picture! I had some scaling issues at first, but with a little testing, I found they were due to a problem with my project, and was able to fix it.

Annoyingly, though, a common screen tearing issue I was having with Godot 3.x has reared its ugly little head again.

This seems to be a common issue on older versions of Android when using GLES3. So, this is excellent progress, but all that remains now is to wait and hope that they re-add GLES2 support.

Action answered 13/12, 2022 at 16:2 Comment(0)
A
0

Just tested an export from Godot 4.0 beta 9 - no change since last post.

Also, forgot to mention - I opened a new issue for the screen tearing over on GitHub. https://github.com/godotengine/godot/issues/70031

EDIT 11.01.23 - 20.02.23
Tested export from Godot 4.0 beta 11 - Godot 4.0 RC 2 - no change

Action answered 20/12, 2022 at 12:25 Comment(0)
A
0

I just tested an export from Godot 4.0 Release Candidate 3, and the screen tearing is no longer occuring on the Retroid Pocket 2+!

Re-tested on the Huawei P10 Lite, too, and it's still no longer occuring on that, either.

This exhausts the Android devices I'm able to test on. Hopefully no-one else is still having the issue on theirs! I encourage reporting it in this thread or on Github if you are.

Action answered 23/2, 2023 at 12:18 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.