Fluid Animation in current version of Renpy

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
stormkwick
Newbie
Posts: 1
Joined: Thu Mar 08, 2018 8:09 am
Contact:

Fluid Animation in current version of Renpy

#1 Post by stormkwick »

I was looking up how to get fluid animated sprites working in Renpy and the posts that came up in my search were saying that there was no support beyond puppet animation, but all these posts i found were 5+ years old. I was wondering if anything has changed since. I know gifs still dont animate by default but is there any work around?

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2402
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Fluid Animation in current version of Renpy

#2 Post by Ocelot »

You can use ATL ( https://www.renpy.org/doc/html/atl.html ) to create animated images:

Code: Select all

image animated_image:
    "frame1.png"
    0.2
    "frame2.png"
    0.2
    "frame3.png"
    0.2
    repeat
< < insert Rick Cook quote here > >

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: Fluid Animation in current version of Renpy

#3 Post by Remix »

Ren'py basically has the lower level facilities in place to show sets of images in sequence, just there is no extensive framework to handle each possible scenario.

As Ocelot mentions, you could simply use ATL though there are other options:
DynamicDisplayable => basically passes the time-base to a python function that returns an image to use for that particular time
LiveComposite => a displayable that layers other images into a single composite
Transforms => zoom, rotate, flip, move, alter alpha etc etc
As each can accommodate the others, the possibilities become endless. For example, you could have a LiveComposite that included an animated DynamicDisplayable part and other parts that rotated or morphed (doll-like), you'd just need to code it to suit.

Some people have taken things further, like here which uses OpenGL so there might even be options to hijack the libgdx or other runtime library of Spine to add full skeleton animation... (note truly sure of which render base Ren'py uses across platforms though, so anything along those lines would need some pre-sleuthing)
Frameworks & Scriptlets:

User avatar
Milkymalk
Miko-Class Veteran
Posts: 753
Joined: Wed Nov 23, 2011 5:30 pm
Completed: Don't Look (AGS game)
Projects: KANPEKI! ★Perfect Play★
Organization: Crappy White Wings
Location: Germany
Contact:

Re: Fluid Animation in current version of Renpy

#4 Post by Milkymalk »

Remix wrote: Thu Mar 08, 2018 9:58 amDynamicDisplayable => basically passes the time-base to a python function that returns an image to use for that particular time
This is actually the first time I see this function documented in a human-readable way. Thank you!

You should to this for more of the cryptic functions many people don't dare use because they look like witchcraft.
Crappy White Wings (currently quite inactive)
Working on: KANPEKI!
(On Hold: New Eden, Imperial Sea, Pure Light)

User avatar
Lord Hisu
Regular
Posts: 58
Joined: Sun Feb 11, 2018 2:31 am
Contact:

Re: Fluid Animation in current version of Renpy

#5 Post by Lord Hisu »

Milkymalk wrote: Thu Mar 08, 2018 10:21 am
Remix wrote: Thu Mar 08, 2018 9:58 amDynamicDisplayable => basically passes the time-base to a python function that returns an image to use for that particular time
This is actually the first time I see this function documented in a human-readable way. Thank you!

You should to this for more of the cryptic functions many people don't dare use because they look like witchcraft.
Truth is that almost everything related to animation in Renpy is not well documented. ATL is awesome, but when you need to do things by hand with Python is when you start to suffer with the documentation.

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: Fluid Animation in current version of Renpy

#6 Post by trooper6 »

One Night Stand has great animation and I think it is just done with ATL. You can check out the game to see what can be done in Ren'Py
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

Post Reply

Who is online

Users browsing this forum: Tomoyo Ichijouji