ATL transitions

A place for Ren'Py tutorials and reusable Ren'Py code.
Forum rules
Do not post questions here!

This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
Post Reply
Message
Author
User avatar
Donmai
Eileen-Class Veteran
Posts: 1958
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

ATL transitions

#1 Post by Donmai »

Some time ago, Tom made a very interesting post about using ATL transforms as transitions.
Here, Crazy Li and I posted some modified versions of Tom's "SlideBoth" ATL transition.

Another ATL transition based on that code can be useful when showing location changes or flashback moments.
Basically, it will zoom in and fade out the current scene, while simultaneously zoom out and fade in a new scene (what? :shock: ).
Well, give it a try and see for yourself.

Put this code anywhere on your game:

Code: Select all

transform locationchange(new_widget, old_widget):
    delay 1.0
    
    contains:
        new_widget
        truecenter
        zoom 2.0 alpha 0.0
        ease 1.0 alpha 1.0 zoom 1.0
        
    contains:
        old_widget
        truecenter
        zoom 1.0 alpha 1.0
        ease 1.0 alpha 0.0 zoom 2.0
Example of usage:

Code: Select all

scene washington
show eileen_happy 
with dissolve

e "We are now ready to take you to the White House where Lucy will tell us what's going on. We take you now to the White House."

scene whitehouse
show lucy_happy
with locationchange

l "Thank you, Eileen. Well, nothing's going on here. This is Lucy speaking. We are returning you now to Eileen."

scene washington
show eileen_concerned
with locationchange

e "Thank you, Lucy. Now that's really embarrassing."
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

User avatar
TheChris
Regular
Posts: 47
Joined: Sat Oct 11, 2014 9:26 pm
Projects: Stickshooter
Deviantart: innocencecanceller
Location: United States
Contact:

Re: ATL transitions

#2 Post by TheChris »

I like it. I'll have to use it in my game. Thanks.

User avatar
Donmai
Eileen-Class Veteran
Posts: 1958
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: ATL transitions

#3 Post by Donmai »

Feel free to contribute with new ideas. It just came to my mind this morning:

Code: Select all

transform pageflip(new_widget, old_widget):
    delay 1.0
    
    contains:
        new_widget
        alpha 0.5
        linear 0.5 alpha 1.0
        
    contains:
        old_widget
        xzoom 1.0
        ease 0.5 xzoom 0.0

Code: Select all

scene page_one
show sprite_1
with dissolve
"Let's turn this page now."
play sound "flipping_page.ogg"
scene page_two
show sprite_2
with pageflip
Last edited by Donmai on Fri Nov 07, 2014 2:42 pm, edited 1 time in total.
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

User avatar
breadslam
Regular
Posts: 97
Joined: Fri Sep 19, 2014 7:57 pm
Tumblr: breadslam
Contact:

Re: ATL transitions

#4 Post by breadslam »

Thanks for the code, Donmai. I've been experimenting with ATL transitions myself, so this sheds a little light on some of the stuff I was fuzzy on. :)

Post Reply

Who is online

Users browsing this forum: No registered users