Ren'Py Tutorial: How to Add Transitions and Character Animations

So, we've learned how to add backgrounds and character sprites to our visual novel. But there's one thing that can make those scenes feel even better: animations!

A character suddenly appearing on the screen can sometimes feel a little static. Maybe you want them to slowly fade in, move across the screen, or even have a subtle breathing animation while they're talking.

Ren'Py actually has quite a few tools for this, and you don't need to use complicated animation software to get started.

Soooo we'll look at how to use built-in transitions and Ren'Py's ATL to animate images directly in your game.

If you haven't followed the previous tutorials yet, you can check them out here:

Let's get started!

1. Using Built-in Transitions

Let's start with something simple.

Transitions control how one image or scene changes into another. Instead of having a new background appear immediately, you can make it fade in or blend smoothly with the previous image.

Here are some of the transitions you'll probably use quite often:

TransitionDescription
fadeFades the screen to black and then into the new scene
dissolveSmoothly blends between the previous and new scene
pixellateCreates a pixelated transition
moveMoves an image to its new position
easeSmoothly moves an image to its new position

For example, let's say you want to change the background from a classroom to a park.

Without a transition:

scene bg classroom

e "It's getting late."

scene bg park

e "Let's go outside!"

The background changes immediately.

Now let's add a fade transition:

scene bg classroom with fade

e "It's getting late."

scene bg park with fade

e "Let's go outside!"

Much smoother!

You can also use dissolve if you want the images to blend into each other without the screen fading to black.

scene bg park with dissolve

Personally, I tend to use dissolve for regular background changes and fade when moving between larger story scenes or time periods.

Controlling Transition Duration in Renpy

You can also control how long a transition takes.

For example:

scene bg park with Dissolve(1.5)

This makes the dissolve last 1.5 seconds.

Or:

scene bg classroom with Fade(0.5, 1.0, 0.5)

The three values represent:

  • First value: Time to fade out.
  • Second value: Time to stay on the black screen.
  • Third value: Time to fade in.

You can adjust these values depending on the atmosphere you're trying to create.

2. Making Characters Fade In and Out

Transitions aren't just for backgrounds. You can also use them when displaying or removing character sprites.

For example:

show eileen happy with dissolve

e "Hey! You're finally here."

hide eileen with dissolve

This makes Eileen smoothly appear and disappear.

You can also use other transitions:

show eileen happy with fade

hide eileen with dissolve

One small thing to remember: show displays the image, while hide removes it. The transition controls how that change happens.

This is a simple way to make character appearances feel a little more natural.

3. Moving Characters Across the Screen

Now let's make things a little more interesting.

What if you want a character to enter the scene from the left side instead of simply appearing in the middle?

You can use ATL to create custom transformations.

ATL stands for Animation and Transformation Language. It allows you to control how images move, change size, rotate and much more.

Let's create a simple animation:

transform enter_from_left:

    xalign -0.5
    yalign 1.0

    ease 1.0 xalign 0.25

Then use it in your script:

scene bg classroom

show eileen happy at enter_from_left

e "Hey! Sorry I'm late!"

Here's what the code does:

  • xalign -0.5 places the character outside the left side of the screen.
  • yalign 1.0 aligns the character with the bottom of the screen.
  • ease 1.0 xalign 0.25 smoothly moves the character to the desired position over one second.

You can change the duration and final position to get different results.

For example, if you want the character to move more slowly:

ease 2.0 xalign 0.25

If you want the movement to be more immediate, you can use linear instead of ease.

linear 1.0 xalign 0.25

The difference is that linear maintains a constant movement speed, while ease gradually slows down as it approaches the destination.

4. Creating a Simple Fade-in Animation with ATL in Renpy

You can also create your own fade-in animation using ATL.

For example:

transform fade_in:

    alpha 0.0
    linear 1.0 alpha 1.0

Then:

show eileen happy at fade_in

The character starts completely transparent and gradually becomes visible over one second.

You can also create a fade-out animation:

transform fade_out:

    alpha 1.0
    linear 1.0 alpha 0.0

And use it like this:

show eileen happy at fade_out

However, this only makes the image transparent. It doesn't automatically hide or remove the image from the scene.

If you want to remove the character afterward, use a separate hide statement.

For simple fading, the built-in dissolve transition is usually easier. ATL becomes more useful when you want to combine fading with other movements or effects.

5. Making Characters Move Up and Down

A small movement can make a character feel more alive, especially when they're talking.

For example, you could create a subtle animation where a character moves slightly up and down.

transform floating:

    yoffset 0

    ease 1.0 yoffset -10
    ease 1.0 yoffset 0

    repeat

Then:

show eileen happy at floating

The character will continuously move up and down by 10 pixels.

The repeat statement tells Ren'Py to repeat the animation indefinitely.

You can adjust the distance and duration depending on how noticeable you want the movement to be.

For example, changing -10 to -5 creates a much more subtle effect.

I personally prefer smaller movements for visual novels. You don't want your characters constantly bouncing around while the player is trying to read dialogue!

6. Rotating and Flipping Images

Ren'Py also allows you to rotate images using ATL.

For example:

transform rotate_character:

    rotate 0

    linear 1.0 rotate 10
    linear 1.0 rotate -10

    repeat

This creates a simple side-to-side rotation.

You can also flip a character horizontally:

transform flip_character:

    xzoom -1.0

Then:

show eileen happy at flip_character

This is useful if you want a character to face the opposite direction without creating another sprite.

You can combine multiple properties in the same transform, too:

transform character_animation:

    xalign 0.25
    yalign 1.0
    zoom 0.8
    rotate 0

    ease 1.0 rotate 5

This gives you more control over how your characters look and move.

7. Using Multiple ATL Properties Together

One of the best things about ATL is that you can combine several properties into one animation.

For example, let's create a character entrance that combines movement and fading.

transform character_enter:

    xalign -0.5
    yalign 1.0
    alpha 0.0

    parallel:
        ease 1.0 xalign 0.25

    parallel:
        linear 1.0 alpha 1.0

Then:

show eileen happy at character_enter

The character will move into position while gradually becoming visible.

The parallel blocks allow multiple animation properties to run at the same time.

Without parallel, ATL statements generally execute in sequence, meaning one animation would finish before the next begins.

You can also use pause if you want to wait between animations:

transform character_entrance:

    alpha 0.0
    pause 0.5

    linear 1.0 alpha 1.0

    pause 0.5

    ease 0.5 xoffset 20

This makes the character wait before appearing, then move slightly after becoming visible.

There are plenty of possibilities once you start combining different ATL properties.

8. Creating a Custom Transform for Your Characters

If you find yourself using the same animation repeatedly, it's a good idea to define it once and reuse it.

For example, let's create a transform for characters appearing on the left side of the screen.

transform left_character:

    xalign 0.25
    yalign 1.0
    zoom 0.8

And another one for the right side:

transform right_character:

    xalign 0.75
    yalign 1.0
    zoom 0.8

Now you can use them throughout your game:

show eileen happy at left_character
show mika happy at right_character

This is especially useful if your visual novel has many characters and you want their positions and sizes to remain consistent.

You can also define different transforms for specific situations, such as:

  • Character entering the screen.
  • Character leaving the screen.
  • Character floating or breathing.
  • Character shaking when surprised.
  • Character zooming in for an important moment.

Keeping these transforms in a separate .rpy file can also make your project easier to maintain.

9. Putting Everything Together

Let's combine some of these effects into a small scene.

In this example, we'll have two characters appear on the screen, one entering from the left, the other from the right. We'll also use a small breathing animation and a background transition.

define e = Character("Eileen", color="#E8A0BF")
define m = Character("Mika", color="#9DBCE8")

image bg classroom = "images/backgrounds/classroom.png"

image eileen happy = "images/characters/eileen/happy.png"
image mika happy = "images/characters/mika/happy.png"

transform enter_left:

    xalign -0.5
    yalign 1.0
    alpha 0.0

    parallel:
        ease 1.0 xalign 0.25

    parallel:
        linear 1.0 alpha 1.0

transform enter_right:

    xalign 1.5
    yalign 1.0
    alpha 0.0

    parallel:
        ease 1.0 xalign 0.75

    parallel:
        linear 1.0 alpha 1.0

label start:

    scene bg classroom with fade

    show eileen happy at enter_left
    show mika happy at enter_right

    pause 1.0

    e "Hey! I was waiting for you."

    m "Sorry! It took me a little longer than expected."

    e "That's okay. Shall we go?"

    m "Sure!"

    hide eileen with dissolve
    hide mika with dissolve

    return

You can replace the example images with your own artwork and adjust the animation values to match your game's style.

Try experimenting with different durations, positions and effects. Even small changes can make a scene feel quite different.

What's Next?

We've now covered some of the basics of Ren'Py transitions and ATL animations, including how to move characters, create fade effects and add subtle movements to your sprites.

In the next tutorial, we'll move on to something a little more interactive: player choices and branching stories!

We'll look at how to create dialogue choices, let players make decisions and build different story routes depending on what they select.

So if you're planning to make an otome game, dating sim or any kind of story-driven visual novel, you'll probably want to follow along with that one.


Need Help Bringing Your Visual Novel to Life?

Animations, character sprites and custom interfaces can make a big difference in how your visual novel feels, but getting everything working together isn't always as simple as it looks.

At YoruBox, we work on indie visual novels and offer help with Ren'Py scripting, custom UI design and game implementation.

If you have a specific feature in mind or need a little help with your project, feel free to check out our services!

yorubox.team
yorubox.team
Articles: 11

Leave a Reply

Your email address will not be published. Required fields are marked *

Subscribe to our newsletter
This field is required.