Is it still OK to use LiveComposite for blinking sprites?
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.
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.
- thirstyoctopus
- Regular
- Posts: 72
- Joined: Mon Aug 27, 2018 12:04 pm
- Projects: Romance Visual Novel story
- Organization: Thirsty Octopus
- Contact:
Is it still OK to use LiveComposite for blinking sprites?
Hey everyone
I was considering implementing a blinking aesthetic to my character sprites in the game I'm working on and doing some searching I could only find the deprecated page referring to LiveComposite for Blinking and Lip Flap. I don't need the lip flap as my game is voice markers only but I wondered if there was another way to have automatic random blinking for sprites that are on screen? I currently use layeredimages in my project and each sprite has a blank face body with a set of expressions, so if I were to separate the eyes from the mouth would it be possible to implement this feature easily?
Any advice on this that steers away from the LiveComposite option would be appreciated, thank you.
I was considering implementing a blinking aesthetic to my character sprites in the game I'm working on and doing some searching I could only find the deprecated page referring to LiveComposite for Blinking and Lip Flap. I don't need the lip flap as my game is voice markers only but I wondered if there was another way to have automatic random blinking for sprites that are on screen? I currently use layeredimages in my project and each sprite has a blank face body with a set of expressions, so if I were to separate the eyes from the mouth would it be possible to implement this feature easily?
Any advice on this that steers away from the LiveComposite option would be appreciated, thank you.
- Ocelot
- Lemma-Class Veteran
- Posts: 2404
- Joined: Tue Aug 23, 2016 10:35 am
- Github: MiiNiPaa
- Discord: MiiNiPaa#4384
- Contact:
Re: Is it still OK to use LiveComposite for blinking sprites?
You can define an ATL animation for your eyes and use that animated image in layeredimage. For example following will create animation with randomly blinking eyes:
Code: Select all
image blinking_eyes:
"eyes_open"
choice:
pause 8.0
choice:
pause 12.0
choice 0.5:
pause 4.0
choice 0.2:
pause 0.8
"eyes_closed"
pause 0.5
repeat
< < insert Rick Cook quote here > >
- thirstyoctopus
- Regular
- Posts: 72
- Joined: Mon Aug 27, 2018 12:04 pm
- Projects: Romance Visual Novel story
- Organization: Thirsty Octopus
- Contact:
Re: Is it still OK to use LiveComposite for blinking sprites?
Thanks for the suggestion. Would you be able to explain how to implement this though? I was hoping I wouldn't have to go through every line I'd included a sprite to be able to make this work.Ocelot wrote: ↑Tue Apr 20, 2021 7:36 am You can define an ATL animation for your eyes and use that animated image in layeredimage. For example following will create animation with randomly blinking eyes:Code: Select all
image blinking_eyes: "eyes_open" choice: pause 8.0 choice: pause 12.0 choice 0.5: pause 4.0 choice 0.2: pause 0.8 "eyes_closed" pause 0.5 repeat
Currently, my layeredimages are set up as follows, with a set of poses and a set of expressions which are assigned automatically based on file name:
Code: Select all
layeredimage l:
group pose auto:
attribute u1 default
group face auto
Code: Select all
show l u1 s1 at position
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3794
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: Is it still OK to use LiveComposite for blinking sprites?
Note that "LiveComposite" was replaced with just "Composite" a few years ago
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Twitter
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
- Syrale
- Regular
- Posts: 101
- Joined: Sun Oct 25, 2015 10:28 am
- Completed: Robot Daycare, Deep Sea Valentine, Locke(d)
- Projects: Artificial Selection, Artificial Fashionista, rei_carnation
- Github: kigyo
- itch: kigyo
- Discord: kigyodev
- Contact:
Re: Is it still OK to use LiveComposite for blinking sprites?
Not sure if you can combine the "auto" method with defining stuff on your own, but if you can, this should work:
Basically: For the animated eyes, you add the name of the image you defined. For all other eyes (aka those that don't blink), you have to add the file path instead.
Code: Select all
layeredimage l:
group pose auto:
attribute u1 default
group face auto
group eyes:
attribute open_eyes default "blinking_eyes"
attribute closed_eyes "images/character/closed_eyes.png"
Artificial Selection (ongoing) |Deep Sea Valentine | Robot Daycare (NaNo19)
| Artificial Fashionista (NaNo24)
My Developer Tools: Ren'Py Minimap/Location System | Ren'Py Word Counter+
My Developer Tools: Ren'Py Minimap/Location System | Ren'Py Word Counter+
- thirstyoctopus
- Regular
- Posts: 72
- Joined: Mon Aug 27, 2018 12:04 pm
- Projects: Romance Visual Novel story
- Organization: Thirsty Octopus
- Contact:
Re: Is it still OK to use LiveComposite for blinking sprites?
I ended up trying a few things and finally got it work this way:Syrale wrote: ↑Wed Apr 21, 2021 3:17 am Not sure if you can combine the "auto" method with defining stuff on your own, but if you can, this should work:Basically: For the animated eyes, you add the name of the image you defined. For all other eyes (aka those that don't blink), you have to add the file path instead.Code: Select all
layeredimage l: group pose auto: attribute u1 default group face auto group eyes: attribute open_eyes default "blinking_eyes" attribute closed_eyes "images/character/closed_eyes.png"
Code: Select all
image l_face_os1:
"lily/pose_1/l_face_os1.png"
choice:
8
choice:
10
choice:
4
choice:
.2
"lily/pose_1/l_face_cs1.png"
pause .5
repeat
Who is online
Users browsing this forum: No registered users