Blink/talking animations, how to put a character together?

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
User avatar
MarieRose1301
Newbie
Posts: 21
Joined: Sat Jun 13, 2015 3:25 am
Projects: Hatsune Miku no Yuuutsu
Deviantart: ConflictLuka
Contact:

Blink/talking animations, how to put a character together?

#1 Post by MarieRose1301 »

I've been looking for info on making blinking and lipsync animations and I don't really understand how to split the image up correctly to have the parts positioned properly in-game
Could anyone help me with it?
This is the archive with 2 pic(default and blink) http://sta.sh/0243hjrwo7rz

User avatar
Alera
Miko-Class Veteran
Posts: 651
Joined: Sun Mar 21, 2010 3:20 am
Completed: Tortichki // Zayay // Hero's Spirit
Deviantart: psyalera
itch: psyalera
Location: UK
Contact:

Re: Blink/talking animations, how to put a character togethe

#2 Post by Alera »

You don't actually need to cut it in any way, but the reason you might want to is for optimisation purposes. (Having tons of full images might end up taking a lot of unnecessary memory. ) Then animating is very simple:

Code: Select all

image mikuBlink = Animation("blink1.png", 2.5, "blink2.png", 0.1, "blink1.png",2.5)
And then what you could do is have a base image with your sprite without eyes and then have the eyes as separate images, BUT have them the same size as the whole sprite. (Sorry, I can't explain this properly, but I've attached a file as an example!) and then have that displayed as an animation on top.

Code: Select all

show mikuBase
show mikuBlink
That's the easiest way I know to have them display exactly where you want them. Maybe someone else has better tips?
Attachments
mikubase.png
miku blink3.png
miku blink3.png (8.45 KiB) Viewed 601 times
Image
Games:
❤️ Zayay [Otome?][BxPlayer][NaNo 2013]
❤️ Tortichki [Drag&Drop mini game]

Other games I've worked on:
My Heart's Flame Emissary of Starlight Freedom From Silence Sickness
And many more unannounced/secret projects. (. .)

User avatar
MarieRose1301
Newbie
Posts: 21
Joined: Sat Jun 13, 2015 3:25 am
Projects: Hatsune Miku no Yuuutsu
Deviantart: ConflictLuka
Contact:

Re: Blink/talking animations, how to put a character togethe

#3 Post by MarieRose1301 »

Alera wrote:You don't actually need to cut it in any way, but the reason you might want to is for optimisation purposes. (Having tons of full images might end up taking a lot of unnecessary memory. ) Then animating is very simple:

Code: Select all

image mikuBlink = Animation("blink1.png", 2.5, "blink2.png", 0.1, "blink1.png",2.5)
And then what you could do is have a base image with your sprite without eyes and then have the eyes as separate images, BUT have them the same size as the whole sprite. (Sorry, I can't explain this properly, but I've attached a file as an example!) and then have that displayed as an animation on top.

Code: Select all

show mikuBase
show mikuBlink
That's the easiest way I know to have them display exactly where you want them. Maybe someone else has better tips?
Oh thank you, that will help me ouo
Now I just need to know how to make the chara blink randomly

User avatar
Alera
Miko-Class Veteran
Posts: 651
Joined: Sun Mar 21, 2010 3:20 am
Completed: Tortichki // Zayay // Hero's Spirit
Deviantart: psyalera
itch: psyalera
Location: UK
Contact:

Re: Blink/talking animations, how to put a character togethe

#4 Post by Alera »

Ok, there is a way to do this. Instead of using Animation there is another way to define the blinking. Like so:

Code: Select all

image mikuBlink:
    "mikudefault.png" # Miku with her eyes open
    choice:
        1.5
    choice:
        4.5
    choice:
        1.0
# ^ these are the random interval values in seconds. You can have as many of those as you want.
    "mikublink3.png" # Miku with her eyes closed.
    0.1
    repeat
Then show the images the exact same way like before.
Image
Games:
❤️ Zayay [Otome?][BxPlayer][NaNo 2013]
❤️ Tortichki [Drag&Drop mini game]

Other games I've worked on:
My Heart's Flame Emissary of Starlight Freedom From Silence Sickness
And many more unannounced/secret projects. (. .)

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Andredron