Advanced Ren’Py: Part 3: Animation and Transformation Language


Working with Ren’Py:

Advanced Ren’Py:

Customizing Ren’Py:

Ren’Py + Python:

Ren’Py is a engine for creating visual novels. It comes with a suite of tools for taking code and transforming it into programs that can be run on Windows, Mac, Linux, and even, with a little more work, mobile platforms like Android and iOS.

Beyond the showing of text and images, Ren’Py can also be extended through introducing new user interface elements, changing its defaults images, and combining Python with its own code to create even more interactive projects.


Animation and Transformation Language

Much like the screen language of Ren’Py is used to arrange elements, there is also an animation and transformation language (ATL) used to create and change other displayables. Serving as a way to create custom effects, the ATL in Ren’Py can be used to build complex animations and interactions using position properties and other special keywords.


Animation (ATL Blocks with Images)


The animation and transformation language can be used with images to create ATL Blocks, sets of rules that apply to or change existing displayables and then produce a new one.

To create a simple, two-frame animation in Ren’Py, for example, two images can be switched with the pause keyword to show an image, stop for a second, show a second image, pause, and then loop again using the repeat keyword.

Screenshot 2018-07-07 19.47.42

In the above example, pause and repeat are two of the special keywords used in the animation and transformation language. The first, pause, is a warper and the second, repeat, is a type of transformation.


A warper is special type of function for changing things over time. Examples include pauselinearease, and the pair of easein and easeout. (Many others also exist.)

Repeat Statement

The repeat statement restarts the block in which it is a part. It can also loop a limited number of time when given a number.



Screenshot 2018-07-07 20.04.23

Transformation are created through the keyword transform and can be used as part of other displayables and screens. Like image blocks, they can also be combined with other statements and warpers.

Screenshot 2018-07-07 20.06.27

The transform ctc_appear uses the alpha transform property with the pause and linear warpers.

To use a transform with a screen, it is used through the at keyword. Containers in a screen are shown at a transform.


Chaining Animations and Transformations


The contains statement can be used to combine animations and transformations. After creating a transform, it can be contained in another another block. When used in an image block, for example, showing the image will trigger not only the contained transformation, but whatever additional statements are within its own block.

Screenshot 2018-07-07 20.26.59