Disable Skipping 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
Offworlder
Regular
Posts: 114
Joined: Mon Aug 20, 2018 6:33 pm
Contact:

Disable Skipping Splashscreen?

#1 Post by Offworlder »

Hello, everyone! I'm actually working with splashscreens for the first time, but I'm having a bit of trouble accomplishing my goal.
I was originally trying to do something a bit more complicated, but for the moment I just want to entirely disable the ability to skip the splashscreen. I know that's basically a cardinal sin, but to be fair, my splashscreen is designed to go by very quickly. And I'm also just working on a test game at the moment. q:

I've tried using "$ renpy.pause(1, hard=True)" in various ways, but it doesn't seem to be working as I would expect. I'm ultimately still able to skip the splashscreen once the allotted time passes and, even worse, it actually extends the length of the pause I already have built in (which I definitely don't want).

Another thing I'd very much like to avoid is being able to skip the dissolve the leads to the main menu. I just really don't like the way it looks when the main menu suddenly POPS into existence. Having seen an unskippable splashscreen in another Ren'py game, I noticed that the ability to click returned as soon as the splashscreen ended. Which means that the main menu still didn't fade in as designed for their game either.

Here's the code I have so far:

MAIN MENU FADE

Code: Select all

define mdissolve = Dissolve(1.5)
label main_menu:
    with None
    $ renpy.transition(mdissolve)
    jump main_menu_screen
SPLASH SCREEN

Code: Select all

label splashscreen:

    scene black
    with Pause(1)
    play sound "audio/ht.mp3" fadein 3

    show splash with mdissolve
    with Pause(1)
    stop sound fadeout 3.0

    scene black with mdissolve
    with Pause(1)

    return
Any and all help would be greatly appreciated!

User avatar
hell_oh_world
Miko-Class Veteran
Posts: 777
Joined: Fri Jul 12, 2019 5:21 am
Contact:

Re: Disable Skipping Splashscreen?

#2 Post by hell_oh_world »

maybe just create a screen with a button set to the whole size of the screen? not sure.

Code: Select all

screen blocker(duration=None):
  if duration:
    timer duration action Hide("blocker")

  button:
    action NullAction()
    background None
    xfill True
    yfill True

Code: Select all

label splashscreen:
  show screen blocker(10) # try it also as call screen blocker, but you might need to replace the Hide("blocker") with Return() for that to work.
  # your splashscreen contents...
  return
For the transition, have a look at this.

User avatar
Offworlder
Regular
Posts: 114
Joined: Mon Aug 20, 2018 6:33 pm
Contact:

Re: Disable Skipping Splashscreen?

#3 Post by Offworlder »

hell_oh_world wrote: Sat Aug 07, 2021 4:59 am maybe just create a screen with a button set to the whole size of the screen? not sure.
Unfortunately, this code didn't do anything when I tried it out. And when using "call" instead", it just stays black permanently.
I took a look at the link you sent as well. I actually tried "define config.end_splash_transition = dissolve" earlier. It was giving me an error previously, but now it just seems to have no effect. D:

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3794
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Disable Skipping Splashscreen?

#4 Post by Imperf3kt »

Code: Select all

define mdissolve = Dissolve(1.5)
label main_menu:
    with None
    $ renpy.transition(mdissolve)
    jump main_menu_screen
SPLASH SCREEN

Code: Select all

label splashscreen:

    scene black
    $ renpy.pause(1, hard=True)
    play sound "audio/ht.mp3" fadein 3

    show splash with mdissolve
    $ renpy.pause(1.5, hard=True)
    stop sound fadeout 3.0

    scene black with mdissolve
    $ renpy.pause(1.5, hard=True)

    return
I don't see how you've used the hard pauses in the code you posted above, but this should work.
Note that your audio will still be fading out for 1.5 seconds as the main menu loads, which could result in the sound being cut off entirely before the fadeout finishes if your main menu includes music.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
Offworlder
Regular
Posts: 114
Joined: Mon Aug 20, 2018 6:33 pm
Contact:

Re: Disable Skipping Splashscreen?

#5 Post by Offworlder »

Imperf3kt wrote: Sat Aug 07, 2021 7:57 am I don't see how you've used the hard pauses in the code you posted above, but this should work.
Note that your audio will still be fading out for 1.5 seconds as the main menu loads, which could result in the sound being cut off entirely before the fadeout finishes if your main menu includes music.
I left my version out of the code since it didn't work as I wanted. I actually tried combining basic "Pause" with "renpy.pause", which definitely wasn't accomplishing my goal. And I tried a version with only "renpy.pause", but it didn't work as well as what you have. Your code is a good happy medium, since even clicking continuously will still show black screen -> logo screen -> black screen -> menu with at least a tiny bit of fade (just slightly faster than designed, for folks who don't want to wait). The audio actually sounds fine, too!

I'm still curious how one would go about making a splashscreen that completely disables all skipping, though. They have this in Cinderella Phenomenon, even if it goes on a bit too long for my taste. While their logo animation is playing, as far as I can tell, no buttons or clicking do anything. But the transition to the menu is super sudden once the logo ends (if you're still clicking).

Most ideally, I'd like for clicking to be disabled until the logo completely finishes fading in (to avoid a sudden jump from black to bright white). As soon as that's done, clicking would cause the music to be cut off (skipping the usual fade-out) and the next black screen to appear (rather than players having to wait for the logo to fade out as it normally would). Then clicking would be disabled again until the main menu finishes fading in.

Alternatively, a version where clicking after the logo fades in immediately initiates the next fade-out (both music and logo), rather than pausing for however long it usually would. But still disabling the ability to click until after the logo fades in fully and making sure that the main menu always fades in, regardless of clicking.

If all of that makes sense. ^^;;

Post Reply

Who is online

Users browsing this forum: Google [Bot], henne