Animate main menu items when transitioning to actual game screen?

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
AERenoir
Veteran
Posts: 320
Joined: Fri May 27, 2011 8:23 pm
Contact:

Animate main menu items when transitioning to actual game screen?

#1 Post by AERenoir »

Basically what I wanted to do is have the buttons and/or the logo fly out of the screen, leaving an "empty" version of whatever the title screen image is, which would then serve as the first image in the actual game itself.

I'm not entirely sure where/how to apply this with ATL to the new GUI system. There's a tutorial for something of a workaround, where you essentially composite together a duplicate of the title screen in the Start label, and then animate the "pieces" with ATL. It seems inconvenient, though. It would be better to just animate the Main Menu buttons/elements itself.

User avatar
gas
Miko-Class Veteran
Posts: 842
Joined: Mon Jan 26, 2009 7:21 pm
Contact:

Re: Animate main menu items when transitioning to actual game screen?

#2 Post by gas »

The main menu context wait for the next interaction to come and THE FIRST thing he does is exit this main menu context.
So there's no way to have something happen "while the context is changing" (it's too late, there's no "inbetween" time from a context to another).

The actual solution to all of this mess, is to skip the main menu (or limit it to just a "CLICK TO START" like in arcades) and use something else instead that live in the same 'start' context. In such something else you're free to do whatever.
That's mean, for example, to do...

Code: Select all

label main_menu:
    return # no main menu
label start:
    scene the_dear_background
    call screen fake_menu # this will be your actual main menu that live inside the 'start' (game) context
    $ what = _return
    # whatever follow...
If you want to debate on a reply I gave to your posts, please QUOTE ME or i'll not be notified about. << now red so probably you'll see it.

10 ? "RENPY"
20 GOTO 10

RUN

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

Re: Animate main menu items when transitioning to actual game screen?

#3 Post by Imperf3kt »

What you want is achievable via the on hide function.

I was going to post earlier, but don't have an example on hand, so waited.

You can animate the buttons to fade out before the menu changes context. For a working example, see Mugenjohncel's game "the fucking question 2.0"
https://vndb.org/v1438
http://games.renpy.org/game/the-fucking ... on-2.shtml
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
AERenoir
Veteran
Posts: 320
Joined: Fri May 27, 2011 8:23 pm
Contact:

Re: Animate main menu items when transitioning to actual game screen?

#4 Post by AERenoir »

Yeah, what gas said is precisely what was shown in the workaround that I have seen.

I'll check out the "on hide" function in the documentation, then. Do I need to erase stuff on the gui script to overhaul it with imagebuttons and such? I'm honestly still not entirely used to the new gui system.

Post Reply

Who is online

Users browsing this forum: No registered users