-
-
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
Add boot splash minimum display time setting #41833
Conversation
This comment has been minimized.
This comment has been minimized.
By default, it is. This PR adds the ability to set a small delay. This is not intended to make you watch the splash screen for 10 seconds. I also don't like long splash screens. It might be worth adding a limit or warning so people don't set the delay too long. On fast devices, simple games start so quickly that you don't have time to see anything, the splash screen literally blinks. It's not very pretty. If you set a delay of 500 ms, then it will not delay you much, but it will give you a chance to at least see what is shown on the splash screen. |
@RaTcHeT302 I'll have to ask you again to pay attention to your language and make sure that your feedback on Godot community channels respects our Code of Conduct, and namely:
As you were warned repeatedly but you keep offending, I'm blocking you for interacting with @godotengine repository for 7 days. Please be more polite and constructive in future interactions once this temporary ban is lifted, or the next step would be a permanent ban. |
I think the potential user will use custom/multiply splash screens with possible animation with a much longer delay (as in many games today) so this change is harmless (if this can be configurable to 0 in the editor settings). |
Minimum display time is more accurate than delay time. Delays are periods of waiting before something happens. Seems like a good option for those that only use the boot splash for startup information. Seeing the msec comparison, I'm curious how long the boot image has been rendered by that point. Is it really going to be visible for all the ticks during setup? |
@avencherus Yes, that's a good name. I gave the name by analogy with As I understand it, |
2214ced
to
b592b74
Compare
By the way, isn't this a mistake?
Also |
It looks OK to me. This line is about setting the clear color for the boot splash, which can be customized via Once the boot splash has been shown, the default clear color is then set to |
Yes, it works right. I am confused because the and the code below looks like the I found an additional problem: the default icon is displayed during boot splash. Is it possible to move the icon initialization code from the and used here: |
I'm not really convinced of the utility of displaying the "dumb" splash screen for a longer duration. It has no possibilities for animation, fade-in effects or anything of the sort. When you want to create a polished splash setup, you generally use a plain color as the splash screen and then set a splash scene as your project's main scene (with its starting color matching the plain color chosen). |
I understand why this feature is needed, but the way it is implemented is not good. It should be a minimum display time. This means that if the engine initialized and loaded the main scene too fast, it should wait until this time has elapsed. For this, measuring the initialization time is needed, and then see if waiting more time is needed. |
b592b74
to
f17ba60
Compare
We reviewed this in the current PR meeting. Its wanted and implementation looks good, seems @reduz feedback was implemented, thansk for that :) The code should be wrapped in an if clause to check whether the setting is set and just do nothing if it wasn't/is set to 0 just for clarity. Otherwise, maybe @lawnjelly wants to give it a final look as timing expert :P But should be good to go otherwise |
There are 2 problems:
For myself, I solved the problem by using the image of a small hourglass. That is, it is more of a boot image than a splash image. I understand why people supported this PR, but now it doesn't seem like a good idea to me. Either leave it as it is and add a clarification that the splash image is actually a boot image, which should have an hourglass icon, the text "Loading..." or something similar, and not logos. Or implement this feature, but more thoroughly than in this PR. |
f17ba60
to
fb3661f
Compare
main/main.cpp
Outdated
PropertyInfo(Variant::INT, | ||
"application/boot_splash/minimum_display_time_msec", | ||
PROPERTY_HINT_RANGE, | ||
"0,100,1,or_greater")); // No negative numbers |
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.
You can add suffix:ms
and remove _msec
from the name I think.
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.
Done.
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.
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.
Yeah the suffix is a new feature, we could use it consistently for this kind of setting/property.
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.
Approved in PR review meeting, though there's still an issue to solve with the docs.
bef9d7d
to
6b6ebaf
Compare
This was fully approved during the PR meeting, thanks for your work! |
Cherry-picked for 3.6. |
Implements #8867.
By default, display time is 0 (equivalent to current behavior).
I found this useful because simple games start so quickly that the splash screen blinks and you can't see anything. The recommended delay is 500 ms – 1 s.
https://github.com/godotengine/godot/blob/b592b74d66f8d728cc512bbde5448d9f4c4e1624/main/main.cpp#L1596
delay_usec
is used instead ofdelay_msec
becausedelay_msec
is defined incore_bind.cpp
and is not yet available inmain.cpp
.This PR is cherry-pickable for 3.2.