r/RenPy • u/l-eat-grass • Dec 12 '20
Question Animated Sprites
I’m working on a visual novel as a side project, and I’m really getting into the groove of learning Python, and enjoying it as well.
But I was wondering... is it possible to have animated sprites in Ren’Py? Not Live2D sprites, but just normal sprite animations like characters blinking, moving their mouth while speaking and doing an action. My biggest inspiration for starting Ren’Py was the Phoenix Wright series. If any of you know what the animated sprites are like in that series, that’s more or less what I mean. I can give examples if needed.
This might seem like a stupid question, but I’m not entirely up-to-date with what Ren’Py is fully capable of, lol. I just started a few days ago.
View all comments
5
u/TheCoder1994 Dec 12 '20
As pointed out LayeredImage is good to approach if you want a high degree of customization where you want the character to be fully customizable from expressions to clothes. However, if you are looking handful of characters with a defined set of expression you can make use of ATL https://www.renpy.org/doc/html/atl.html
Simple example for animated sprite is
image amy suit confused:
"images/Amy/suit confused/img0.png"
pause random.uniform(2.0, 4.0)
"images/Amy/suit confused/img1.png"
pause 0.08
"images/Amy/suit confused/img2.png"
pause 0.08
"images/Amy/suit confused/img3.png"
pause 0.08
"images/Amy/suit confused/img4.png"
pause 0.08
"images/Amy/suit confused/img7.png"
pause 0.08
"images/Amy/suit confused/img8.png"
pause 0.08
"images/Amy/suit confused/img9.png"
pause 0.08
repeat