[SOLVED] Bizarre behavior with splashscreen

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
AVNSnax
Regular
Posts: 79
Joined: Sun Feb 06, 2022 12:11 am
itch: avnsnax
Contact:

[SOLVED] Bizarre behavior with splashscreen

#1 Post by AVNSnax »

I'm having a bizarre new issue having to do with a splash screen. Code that worked before, now doesn't. During development and running the app using the launcher, my splashscreen code is no longer being called. Yes, I know about the new Preferences→Options→Skip splashscreen button. And yes, it's unchecked. If I build the app and run it directly, it works fine.

Thinking it may have been introduced by my move to 8.2.0, I switched back to 8.1.3, but the behavior is the same.

Once I get to the main menu, I can manually launch the splash screen from the console:

Code: Select all

renpy.call_in_new_context('splashscreen')
and it works fine. So I know that the label exists and is being seen. I just can't figure out why it never gets called when launched from the launcher.

The splash screen isn't rocket science: it just plays some music, loads a legal acknowledgement screen, shows a brief logo video, then exits to the main menu. It's worked fine for two years.

Has anyone else seen anything similar? Do I need to declare splashscreen in some special context? Right now, it's in the same *.rpy file as start. The only way I can test the startup code at the moment is to go through the lengthy process of building a distribution bundle and then running it after unzipping it to another folder. Not ideal, obviously.
Last edited by AVNSnax on Tue Feb 06, 2024 2:17 pm, edited 1 time in total.

User avatar
m_from_space
Miko-Class Veteran
Posts: 990
Joined: Sun Feb 21, 2021 3:36 am
Contact:

Re: Bizarre behavior with splashscreen

#2 Post by m_from_space »

AVNSnax wrote: Mon Feb 05, 2024 5:39 pm I'm having a bizarre new issue having to do with a splash screen. Code that worked before, now doesn't. During development and running the app using the launcher, my splashscreen code is no longer being called. Yes, I know about the new Preferences→Options→Skip splashscreen button. And yes, it's unchecked. If I build the app and run it directly, it works fine.
I tested the behavior in my Renpy 8.2.1 (Nightly Fix) and the splashscreen works fine. If I check "Skip splashscreen" in the launcher options, it is skipped. If I uncheck, it is shown again when launching.

You don't have to do anything special regarding the splashscreen. Just put a label with that name in your script.rpy or anywhere else. What does your splashscreen look like?

Code: Select all

label splashscreen:
    "Hey, I am the splashsreen."
    return

label start:
    ...

User avatar
AVNSnax
Regular
Posts: 79
Joined: Sun Feb 06, 2022 12:11 am
itch: avnsnax
Contact:

Re: Bizarre behavior with splashscreen

#3 Post by AVNSnax »

m_from_space wrote: Tue Feb 06, 2024 9:23 am I tested the behavior in my Renpy 8.2.1 (Nightly Fix) and the splashscreen works fine. If I check "Skip splashscreen" in the launcher options, it is skipped. If I uncheck, it is shown again when launching.

You don't have to do anything special regarding the splashscreen. Just put a label with that name in your script.rpy or anywhere else. What does your splashscreen look like?

Code: Select all

label splashscreen:
    "Hey, I am the splashsreen."
    return

label start:
    ...
I've had splashscreens in games for the past two years. I said that I noticed that it suddenly stopped working when I upgraded to 8.2.0, not that it was 8.2.0's fault. I also said that I went back to 8.1.3 to double-check, and that the issue was still there.

I know it works. It's been working for me. One of the first things I did was modify The Question to add a splashscreen and try to localize the problem. Of course, it worked, so the problem is localized to my code, somewhere. But where?

The label is there. In the console,

Code: Select all

renpy.seen_label('splashscreen')
returns True.

Code: Select all

renpy.call_in_new_context('splashscreen')
executes the code there with no issue. It just doesn't seem to be called at launch time, and that is the bizarre behavior I was referring to. Lint'ing doesn't report any issues. I moved the code out of utilities.rpy where it was originally into a separate file. No change. I tested changing the init offset. I renamed the file splashscreen was in to 0100000000startup.rpy to get the code to be seen earlier. I double-checked that splashscreen wasn't used as a variable name anywhere else in the code. (I mean, why would that be, but I was desperately grasping at straws...)

I was asking if anyone else had ever seen anything similar, to try and narrow down the possible cause because at the moment, I'm stumped.

User avatar
AVNSnax
Regular
Posts: 79
Joined: Sun Feb 06, 2022 12:11 am
itch: avnsnax
Contact:

Re: Bizarre behavior with splashscreen

#4 Post by AVNSnax »

:shock: That boom that you just heard was the sound of my forehead crashing to my desk.

My project includes 0x52_URM to test the game when built for distribution because by that point the console is turned off. I have a build rule to omit it from build packages destined for release.

The latest version of 0x52_URM has an option to bypass the startup screen.

Sigh. Problem solved.

User avatar
m_from_space
Miko-Class Veteran
Posts: 990
Joined: Sun Feb 21, 2021 3:36 am
Contact:

Re: Bizarre behavior with splashscreen

#5 Post by m_from_space »

AVNSnax wrote: Tue Feb 06, 2024 11:50 am I've had splashscreens in games for the past two years. I said that I noticed that it suddenly stopped working when I upgraded to 8.2.0, not that it was 8.2.0's fault. I also said that I went back to 8.1.3 to double-check, and that the issue was still there.
Hey, I'm glad you found the issue. I just was stating that in the last Renpy version I was using it works fine - it could have been an issue with a version before that. As I said, I am on Renpy 8.2.1. You never know, I am not the one familiar with your code, so I have to ask simple questions first. ;)

Post Reply

Who is online

Users browsing this forum: Google [Bot]