Working with Ren’Py:
- Part 1: Downloading and Configuring
- Part 2: Editing and Creating Characters
- Part 3: Scenes and Showing Images
- Part 4: Menus, Labels, and Jumps
- Part 5: Variables and Conditional Statements
- Part 6: Transitions
- Part 7: Building Distributions
- Part 1: Screen Language
- Part 2: Position Style Properties
- Part 3: Animation and Transformation Language
- Part 4: Text and Button
- Part 5: Bar and VBar
- Part 6: Textbutton and Imagebutton
- Part 7: Input, Key, and Mousearea
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.
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 pause, linear, ease, and the pair of easein and easeout. (Many others also exist.)
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.
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.
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.