-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
[3.2] [iOS] Option to use storyboards for launch screens. #40173
[3.2] [iOS] Option to use storyboards for launch screens. #40173
Conversation
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "storyboard/use_launch_screen_storyboard"), false)); | ||
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "storyboard/image_scale_mode", PROPERTY_HINT_ENUM, "Same as Logo,Center,Scale To Fit,Scale To Fill,Scale"), 0)); | ||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "storyboard/custom_image@2x", PROPERTY_HINT_FILE, "*.png"), "")); | ||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "storyboard/custom_image@3x", PROPERTY_HINT_FILE, "*.png"), "")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default splash.png
for the 2x and 3x size have the same 800x600 size, probably it's better to make them actually be 2x and 3x sized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using same size for default splash.png
is intentional. When I tried to use correctly sized default images - splash screen would differ from Godot’s logo on devices using @3x
, like iPhone XS. I guess it have something to do with the way logo is displayed when it’s not scaling - it uses exact image size without modifying it in any way
Thanks! |
This is great! Thanks a lot. I tried it and the storyboard option works well. However, after the storyboard shows up, it disappears and I get a black screen for several seconds (custom color is black in the project settings) until the game is loaded and starts. I guess the problem is of the same nature as the one described for Android in #21824 and the example project attached there exhibits the problem. Maybe you can have a look. Thanks again for the support of storyboards! |
@oeleo1 well, iOS loading screen is displayed only while application loads dylibs into memory and performs |
Thanks for your input. The referred proposal suggests removing the boot splash which is not what we need. We do need boot splash, it is absolutely essential for big games (200+MB) which take many seconds to load, No one would launch a game and appreciate a black screen for 10 seconds. So the question is whether we can let the storyboard (as a derivative of the boot splash) last until |
The intent of the proposal was to avoid the "double splash" of having a Launcher image followed by another Godot splash for projects that don't need a second splash. Whether you require a single splash or not, in both cases we want to keep the Launch Image until something is ready to take over so that we don't get the period of blackness in the middle. Perhaps that should be fleshed out as its own proposal - they are related but not quite the same. If your app is massive, you probably want to keep the launch image there long enough to load an initial splash scene, and use background loading (e.g. via ResourceInteractiveLoader) to give loading progress whilst the rest of your game starts up. Edit: Also thanks for this! Was looking for storyboard support. I'm pretty sure Apple will make it mandatory at some point in the near future anyway (currently is just "recommended"). |
You've done an amazing job on this -- I can't tell you how happy I am to see this commit. Now, I hear you on the background loading, but that's like taking a U-turn on the standard straightforward loading sequence. What we really need is an image while the game loads "as is". And we just can't get it. Please try the attached simplistic project (2 nodes) on iOS which really shows what our problem is. I'll take any solution. Thanks! |
As I said this changes that you want would probably require changes in how iOS platform performs Godot's loading sequence. This would probably need a proposal or an issue :) |
The issue is #38897 which has been closed and redirected to #21824 which is open since 2.5 years. Not sure what else we need here, except to understand why the boot image doesn't show on the screen on iOS when Godot writes to the system FBO in I'd be happy with a solution which lets the storyboard last until the user project starts,which is just what the boot splash logo is for and which currently doesn't work. |
This PR gives developer an option to use
.storyboard
file instead of simple images for iOS application's launch screen.Default value for this setting is
false
so it wouldn't break existing projects export.By default storyboard uses the same values (background, image, scaling) used for Godot's logo screen. But user can specify specific parameters if required.
Should fix #39325 as well as future warnings or errors regarding incorrect launch image sizes.
Also removes current warnings about
LaunchImage
deprecation.Tested on multiple devices (iPad, and multiple iPhones).
Without using custom settings for launch screen the result looks the same as Godot's logo in
Main::setup2()
method call.One thing to note: to correctly test this change, it might be required to delete resulting app and restart iOS device after reexporting godot project, since iOS seems to be caching launch screen images and storyboards.
Currently fully testable only on
3.2
, butmaster
's version of this commit is also ready for PR and it builds on osx and displays new export options.