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
Show splash screen earlier and reintroduce intro music #6412
base: master
Are you sure you want to change the base?
Conversation
…re started move fitted background blitting function to RenderTarget add helper function to Image
handle initial window events before drawing splash image end splash screen as soon as main menu is responsive
Assigned to tothxa |
Mirrored from Codeberg When using a theme add-on this loads the default splash screen image and not the one of the add-on. In result the default splash is shown and close after that the splash from the add-on is shown and then the main menu. Is there a way to slow down the startup for testing purposes? Some when i noticed that filling the image cache slows down the startup, e.g. with minimalistic theme a black screen is shown for a short time (~1 sec.) before the splash screen of the addon is shown. |
Mirrored from Codeberg
|
Mirrored from Codeberg After fixing the =/== typo it compiled, but I am still not really happy with this change. In my opinion the intro music doesn't really fit to the gameplay and is better suited to the first startup. Big +1 for the other cleanup and refactoring changes though :) |
Mirrored from Codeberg
Oops, I was a bit confused about that. I'm afraid that's very hard to solve, as I don't think we could get this picture from the configured add-on theme early enough.
You can add <@>Nordfriese Thanks, fixed. Why didn't the workflow checks got this? |
Mirrored from Codeberg <@>frankystone The last commit should fix the custom splash.jpg problem for most normal use cases, except for the first time it is run. (on first install it should work fine, because in that case there should be no addons) For consecutive runs it should work as long as the user doesn't tamper with the config file and the addons directory. I can imagine another failure case: if the theme is changed but the game crashes without saving the config. So this is a simple, mostly cleanish pseudo-solution for 99% of the cases. I hope that suffices... |
Mirrored from Codeberg
Yes, that's ok, imho. |
Mirrored from Codeberg
Hmm, that's strange. The same function is used to draw the image in both places, and nothing is supposed to draw anything in between. (and it works nicely for me) What kind of flickering is it? Does the window black out, or does its size also change, or is it something else?
Done, kind of. Though you say you tried this and it works, I'm still more comfortable with initialising the sound after
Will do. Though I didn't really like this the last time I tried it, because the intro music is too long.
I don't like this suggestion. A click means the user is impatient, we should end the splash as fast as we can.
I think this one should keep the nice slow fade-out. |
Mirrored from Codeberg
tested it a bit more and it works nicely in windowed mode but gets a short flickering (like 1 frame) in fullscreen mode. It feels like the fading image needs to adopt to the fullscreen.
works, but only if you recopy the intro.ogg from master. seems the default volume of this file has been changed to zero in your repo.
therefore everyone has the possibility to end this with a click.
well the fade is 2 seconds which seems to be short in any case however I am ok wizh a hard switch on click.
ok some more observations: |
wait for intro music to finish before ending splash screen hide mouse cursor until splash can be clicked away
Mirrored from Codeberg The last commit may fix the flickering, hopefully. It also hides the mouse cursor for as long as easily possible — on my system it re-apperas shortly before the footer text changes, as in noticeably, but clearly with less than a second difference.
IIRC I only used Also IIRC, and AFAICT we don't have a lossless version of the intro music.
It's not very nice to our users (and ourselves, as far as I'm concerned) to force them to either click away, or sit through a one minute splash screen. And the intro is not only long, but also starts too slowly, so it doesn't work well when clicked away.
Isn't that just the OS caching?
I think this is not only a new feature, but also much more involved than what we want in a stable hotfix. And IIRC v1.1 (and maybe v1.0) already had a long delay before the splash image appeared. |
Mirrored from Codeberg
ok for the mouse, unfortunately not for the dlick in the fullscreen mode.
well your version plays in VLC but not in the game. As it has (like the original) a very high bitrate, I just reencoded it to 160 kB as most of our other music files are encoded with that using vlc and this version was working in game as well. I attached it in previous version of this comment but codeberg deleted all this text and just uploaded the file (see previous comment)
Starting sequence is what I most like with this file and the silence has been cut by you, however I agree that 50 secs might be too long. What would you say about showing the splash and playing the intro for another 5 or 10 seconds after all the loading has done and then start the fadeout.
Ok I understand if you feel not comfortable with this, it is just that I find the 20 sec balck screen very annoying and whonder why nobody complained about it yet. |
Mirrored from Codeberg
ok for the mouse, unfortunately still a flick in fullscreen mode
well, the file in your repo does play with vlc but not in the game on my machine. I notoced that it has a very high bitrate in the original anyway (499kB while most of our other music has only 160 kB) so I tried reencoding your version with vlc to 160 kB, and this works in game with the silence cut as well. I attach it here to let you decide whether you might like it.
the slow start has been fixed by your cutting imho, but I agree that the full 50 secs wait is probably too long. So what about showing it another 10 or 5 seconds after all the loading has finished and then fade out. (still abortable by a click for the very impatient of course)
ok this was just a suggestion, although I really whonder why nobody has complained about that yet. But I undrstand if you don't feel comfortable with this. |
tweak some comments
Mirrored from Codeberg The last commit contains another tweak that may help with the flicker... could you please test it?
Wow, that's almost as good as lossless then. Thank you! I re-edited from the original, filtering out the very low frequency (<4Hz) wave it had and with nicer deletions at the start and end, then normalised it to give the volume a little boost, because I like to set the background music lower than other sounds, so the intro plays with too low volume for me... Could you please test whether this works for you: intro_filter_norm.ogg
I may try that next. At least it has the advantage that it adapts to the actual startup time.
Well, I've only found it mildly annoying, because it's only a few seconds for me with release builds. But I don't have many add-ons enabled. |
Mirrored from Codeberg your new soundfile works pretty well. I have attached a small video made wih my mobile to show the flickering in full screen mode. (don't bother about no sound is playing - I had my earphones plugged in. |
- high-pass filter >4Hz - cut silence at start and end - normalise to max without clipping - re-encode at ~160k Co-authored-by: hessenfarmer <[email protected]>
fix swapping main menu background too soon after end of splash
Mirrored from Codeberg
I have no more ideas how to try to fix it easily. :( I tried stepping through the startup sequence in |
fix hourglass cursor use in the progress window
@@ -178,6 +178,7 @@ function developers() return { | |||
"Florian Angermeier (fraang)", | |||
"DragonAtma", | |||
"Benedikt Straub (Nordfriese)", | |||
"Tóth András", |
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.
please read the first line of this file ;-) and do not change this.
Mirrored from Codeberg
Created on Thu Mar 14 15:41:15 CET 2024 by Tóth András (tothxa)
Type of change
New feature / Refactoring
Issue(s) closed
New behavior
MainMenu
rect()
method for classImage
and converted found applicable placesPossible regressions
Start up, music switching, mouse cursor changes
Additional context
This is the alternative PR promised in #6409 / https://codeberg.org/wl/widelands/issues/4759#issuecomment-1660296
I'd turn all
log_info()
calls toverb_log_info()
at least for the start-up, but maybe that'd be better in a separate PR (also implementing multiple choices instead of just verbose or not).