Fade to black when you start a new game?

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
InvertMouse
Regular
Posts: 95
Joined: Sat May 31, 2014 3:41 am
Completed: Unhack
Organization: InvertMouse
Location: Sydney, Australia
Contact:

Fade to black when you start a new game?

#1 Post by InvertMouse »

Hi there :). When you call Start() to begin a new game, is it possible to make the menu slowly fade to black first? I have tried to set up the transition config here:

https://www.renpy.org/doc/html/config.html

But none of them seem to do the trick. Sorry for not knowing something so basic. I tried to look at the docs, and I searched the forums, but I wasn't able to find an answer. Chances are, I just failed to use the right keywords.

Thank you!
Image

User avatar
indoneko
Miko-Class Veteran
Posts: 528
Joined: Sat Sep 03, 2016 4:00 am
Contact:

Re: Fade to black when you start a new game?

#2 Post by indoneko »

Renpy doesn't have any transition between the main menu and the beginning of a new game.
My avatar is courtesy of Mellanthe

User avatar
Arowana
Miko-Class Veteran
Posts: 531
Joined: Thu May 31, 2012 11:17 pm
Completed: a2 ~a due~
Projects: AXIOM.01, The Pirate Mermaid
Organization: Variable X, Navigame
Tumblr: navigame-media
itch: navigame
Contact:

Re: Fade to black when you start a new game?

#3 Post by Arowana »

I think you can just write the transition when you begin your first scene. For example:

Code: Select all

label start:
    scene school
    with fade
    "My first scene."
Complete: a2 ~a due~ (music, language, love)
In progress: The Pirate Mermaid (fairytale otome)
On hold: AXIOM.01 (girl detective game)

Image

User avatar
InvertMouse
Regular
Posts: 95
Joined: Sat May 31, 2014 3:41 am
Completed: Unhack
Organization: InvertMouse
Location: Sydney, Australia
Contact:

Re: Fade to black when you start a new game?

#4 Post by InvertMouse »

Thank you for the responses :). Yeah, you can start the scene with fade, but the menu will still jump to black first without fading.
Image

User avatar
Arowana
Miko-Class Veteran
Posts: 531
Joined: Thu May 31, 2012 11:17 pm
Completed: a2 ~a due~
Projects: AXIOM.01, The Pirate Mermaid
Organization: Variable X, Navigame
Tumblr: navigame-media
itch: navigame
Contact:

Re: Fade to black when you start a new game?

#5 Post by Arowana »

Hmm, really? The menu fades smoothly for me without jumping. Or maybe I'm misunderstanding the effect you're looking for?
Complete: a2 ~a due~ (music, language, love)
In progress: The Pirate Mermaid (fairytale otome)
On hold: AXIOM.01 (girl detective game)

Image

User avatar
indoneko
Miko-Class Veteran
Posts: 528
Joined: Sat Sep 03, 2016 4:00 am
Contact:

Re: Fade to black when you start a new game?

#6 Post by indoneko »

@Invertmouse : if you're typing "scene black" and "with fade" on the same line, the result will be different from typing them on different lines. Arowana's code actually works; it emulates transition between main menu and new game (which by default isn't supported in renpy's config).
My avatar is courtesy of Mellanthe

User avatar
IrinaLazareva
Veteran
Posts: 399
Joined: Wed Jun 08, 2016 1:49 pm
Projects: Legacy
Organization: SunShI
Location: St.Petersburg, Russia
Contact:

Re: Fade to black when you start a new game?

#7 Post by IrinaLazareva »

Well...
For example, that is real screen of main menu (in screens.rpy)

Code: Select all

screen main_menu():

    tag menu
    window:
        style "mm_root"
    frame:
        style_group "mm"
        xalign .98
        yalign .98
        has vbox
        textbutton _("Start Game") action Start()
        textbutton _("Load Game") action ShowMenu("load")
        textbutton _("Preferences") action ShowMenu("preferences")
        textbutton _("Help") action Help()
        textbutton _("Quit") action Quit(confirm=False)
then

Code: Select all

#fake screen of main menu (just copy)
screen notmain_menu():
    tag menu
    window:
        style "mm_root"
    frame:
        style_group "mm"
        xalign .98
        yalign .98
        has vbox
        textbutton _("Start Game") action NullAction()   #disabled (just in case)
        textbutton _("Load Game") action NullAction()
        textbutton _("Preferences") action NullAction()
        textbutton _("Help") action NullAction()
        textbutton _("Quit") action NullAction()
    timer .1 action Hide("notmain_menu", transition=Fade(2, 0, 0)) ## add Transition

# The game starts here.
label start:
    show screen notmain_menu
    scene black
    $ renpy.pause (3, hard=True)
    "Hello"
    return

User avatar
InvertMouse
Regular
Posts: 95
Joined: Sat May 31, 2014 3:41 am
Completed: Unhack
Organization: InvertMouse
Location: Sydney, Australia
Contact:

Re: Fade to black when you start a new game?

#8 Post by InvertMouse »

Thanks again everyone :). indoneko, yes, your response works! I had no idea putting them on separate lines made a difference. Thank you.
Image

Post Reply

Who is online

Users browsing this forum: Google [Bot]