Animation in renpy

AsmodeusDen

Newbie
Game Developer
Oct 1, 2021
54
136
Hi everyone! We are the developers of Dominum (wich you can find here: https://f95zone.to/threads/dominum-v0-2-1-asmodeus-den.95911/ ).
We are still learning about renpy and all it can do, but we are eager to try new things. Case in question: How to introduce animations to renpy?
We have read lots of things in reddit and Renpy official page, so we would like to hear F95 opinion about it!
How do you make animations in your renpy games? Wich method is better in your opinion?
 

mickydoo

Fudged it again.
Game Developer
Jan 5, 2018
2,446
3,547
Python:
image whatever = Movie(play="sexytime.webm")

show image whatever
pause
Better way
 
  • Like
Reactions: AsmodeusDen

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,131
14,812
Python:
image whatever = Movie(play="sexytime.webm")

show image whatever
pause
Better way
Even better:
image whatever = Movie( play="sexytime.webm", start_image="FirstFrame.jpg", image="LastFrame.jpg"
With "FirstFrame" and "LastFrame" addressing the movie frames.


But movies aren't the only way to do animations in Ren'Py. It come with it's own .
 
  • Like
Reactions: AsmodeusDen

AsmodeusDen

Newbie
Game Developer
Oct 1, 2021
54
136
Even better:
image whatever = Movie( play="sexytime.webm", start_image="FirstFrame.jpg", image="LastFrame.jpg"
With "FirstFrame" and "LastFrame" addressing the movie frames.


But movies aren't the only way to do animations in Ren'Py. It come with it's own .
Would this create an animation using the images you write as "frames" or you have to actually made the animation outside renpy and then add them as frames?
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,131
14,812
Would this create an animation using the images you write as "frames" or you have to actually made the animation outside renpy and then add them as frames?
This would make Ren'Py display the frames before ("start_image") and after ("image") the animation. What will make the animation appear more smooth since the player would have something to see, both while the animation is loaded, and when Ren'Py is freeing some memory in order to continue.

As for the Animation and Transform Language (ATL), yes, they would permit to make the animation directly in Ren'py. But the result will rarely be as good as a movie.
While it can goes as far as 60 frame per second, this don't include the time past processing the images. And an effective frame by frame animation would take more place than a movie, because it would benefit from compression advantage that the frame by frame approach wouldn't have.

Therefore all depend on the animation you intent to do.
If it's to make the character blink time to time, ATL is the best option. This because it's something punctual that three/four frames can handle ; it would need more time to load and play the movie, than to perform the animation with ATL. Same if you want the character to not feel too static. Using two frames with a small shift in the position of the character, would be enough and give better result than an animation. With some times and practice, you don't even need full images for the frames.
But if you want to effectively animate a scene, then a movie is the best answer.
 
  • Like
Reactions: AsmodeusDen