• To improve security, we will soon start forcing password resets for any account that uses a weak password on the next login. If you have a weak password or a defunct email, please update it now to prevent future disruption.

Seamless movie transition in Ren'py

D

Dr PinkCake

Guest
Guest
I'm trying to achieve seamless movie transitions between three different sex animations in Ren'Py. The player should be able to speed up or slow down the animation.

Is there a simple way to achieve this?

At the moment I have created three anims with different speed and switch between them, but the switch doesn't necessarily happen at a synched up frame.

I couldn't find native support for changing playback speed in Ren'Py (that would be the simplest solution).

This is how it looks right now for me:
anim.jpg
The functionality I want is there, but I had to resort to dissolve transitions as the frames didn't line up.

Here is my dummy code:
plus = plus button, minus = minus button, mid = speed indicator, invisible button = button for ending animation, covers gray anim area in image.

Code:
image anim_slow = Movie(channel="anim_slow", play="images/anim_slow.webm")
image anim_mid = Movie(channel="anim_mid", play="images/anim_mid.webm")
image anim_fast = Movie(channel="anim_fast", play="images/anim_fast.webm")

label midAnim:
show anim_mid with dissolve
$ renpy.pause(0.1)
$ ui.imagebutton("plus", "plus", clicked=ui.returns("faster"), xpos=1850, ypos=885)
$ ui.imagebutton("minus", "minus", clicked=ui.returns("slower"), xpos=1850, ypos=1010)
$ ui.imagebutton("mid", "mid", clicked=ui.returns("mid"), xpos=1850, ypos=955)
hide anim_slow
hide anim_fast
$ ui.imagebutton("invisiblebutton", "invisiblebutton", clicked=ui.returns("done"), xpos=0, ypos=0)
$ result = ui.interact()
jump selectAnimSpeed


label fasterAnim:
show anim_fast with dissolve
$ renpy.pause(0.1)
$ ui.imagebutton("plus_off", "plus_off", clicked=ui.returns("faster"), xpos=1850, ypos=885)
$ ui.imagebutton("minus", "minus", clicked=ui.returns("mid"), xpos=1850, ypos=1010)
$ ui.imagebutton("fast", "fast", clicked=ui.returns("faster"), xpos=1850, ypos=955)
hide anim_mid
$ ui.imagebutton("invisiblebutton", "invisiblebutton", clicked=ui.returns("done"), xpos=0, ypos=0)
$ result = ui.interact()
jump selectAnimSpeed

label slowerAnim:
show anim_slow with dissolve
$ renpy.pause(0.1)
$ ui.imagebutton("plus", "plus", clicked=ui.returns("mid"), xpos=1850, ypos=885)
$ ui.imagebutton("minus_off", "minus_off", clicked=ui.returns("slower"), xpos=1850, ypos=1010)
$ ui.imagebutton("slow", "slow", clicked=ui.returns("slower"), xpos=1850, ypos=955)
hide anim_mid
$ ui.imagebutton("invisiblebutton", "invisiblebutton", clicked=ui.returns("done"), xpos=0, ypos=0)
$ result = ui.interact()
jump selectAnimSpeed

label selectAnimSpeed:
if result == "faster":
    jump fasterAnim
elif result == "slower":
    jump slowerAnim
elif result == "mid":
    jump midAnim
else:
    hide anim_fast
    hide anim_slow
    hide anim_mid
    jump done

label done:
    "DONE"
 

Palanto

Active Member
Game Developer
Oct 4, 2017
964
1,839
Hmmm, did you try the " " function? I didn't test it yet so I don't know if that one helps.... wouldn't it be best if you let the animation run through to the end and then start the new movie right from the beginning of the next cycle? It wouldn't switch speeds immediately then but at least it would always start at the same frame.
 
  • Like
Reactions: Dr PinkCake
D

Dr PinkCake

Guest
Guest
I will check it out. I thought of ending the animation at the end as well but it isn't feasible as I have one animation that is 22 seconds long...
 
  • Like
Reactions: Palanto

Palanto

Active Member
Game Developer
Oct 4, 2017
964
1,839
Sorry but that's all the help I could give, since I didn't try something like that yet. I can only recommend asking on the ren'py discord server, there are a lot of great people in there who'll try to help if it's at all possible :)
 
  • Like
Reactions: Dr PinkCake

the66

beware, the germans are cumming
Modder
Respected User
Donor
Jan 27, 2017
7,617
23,601
did you try to create your own Movie() displayable that actually uses the fps argument?
 
  • Like
Reactions: Dr PinkCake
D

Dr PinkCake

Guest
Guest
did you try to create your own Movie() displayable that actually uses the fps argument?
Yes, I tried adding the FPS argument and it didn't do anything. According to online documentation I found it isn't used yet. What I've done now is to use the zorder argument to just reorder movie layers. It looks better, but is still not optimal.
 

the66

beware, the germans are cumming
Modder
Respected User
Donor
Jan 27, 2017
7,617
23,601
yep, i read that it doesn't do anything atm
but what would be, if you write your own object and alter the part with the auto-detection of the movie framerate and use your own setting for a change of movie speed
i thought this was your orig. idea
 
D

Dr PinkCake

Guest
Guest
yep, i read that it doesn't do anything atm
but what would be, if you write your own object and alter the part with the auto-detection of the movie framerate and use your own setting for a change of movie speed
i thought this was your orig. idea
Yes that could work, granted that it is possible to change the FPS of the anim as it is playing. I will try to achieve this.
 
Jun 16, 2018
27
8
The movies were okay the first few times I saw them but it seems like every game uses the same animations. Hope yours are different at least cause the game good so far
 
D

Dr PinkCake

Guest
Guest
The movies were okay the first few times I saw them but it seems like every game uses the same animations. Hope yours are different at least cause the game good so far
A lot of games uses stock animations from renderotica. I do my animations from scratch using poses as start positions. So they will be different from what you see in other games. :)
 
  • Like
Reactions: lebeauilicious
Jun 16, 2018
27
8
A lot of games uses stock animations from renderotica. I do my animations from scratch using poses as start positions. So they will be different from what you see in other games. :)
Very great to hear! Seems like yours and welcome temptation are the only good new games out there. Everything else is incest with the same models. Though I do recognize the black friend and megans friend with the nose piercing, the rest seem original and unique