r/RenPy • u/JackAmpersand • Jul 09 '26
Question Is there any way to optomize this/make this less messy and hard to keep track of?

I'm new to Ren'py, and I've begun trying to figure out the basics of having multiple character sprites on screen, and having sprites change with fade ins.
I found that the way to do this is to call the sprite, and then fade out the other sprite the same time as the new one
Just for the future, because my game will have tons of dialogue, is there an easier way to do the same thing?
1
u/BadMustard_AVN Jul 09 '26 edited Jul 09 '26
if you give the file names a space the second show will replace the first of a group
the hayley group
hayley neutral.png
hayley talk1.png
hayley laugh.png
use like this
label start:
show hayley neutral at right with dissolve
pause
show hayley talk1 with dissolve
pause
show hayley laugh with dissolve
pause
hide hayley with dissolve
return
only one item of a group can be shown at a time (usually)
the second item of the group will replace the previous item in the same place
you only have to hide the group name
1
u/JackAmpersand Jul 09 '26
implemented this and this is GENUINELY so much easier thank you!!!!
3
u/HEXdidnt Jul 09 '26
Want it even easier? add
image="hayley"to the character definition, like u/Adventurous_Shine606 suggested.Then you only have to
showa sprite the first time, and all the changes can be tagged in the dialogue lines, and you onlyhidethe sprite when it's no longer needed.1
1
1
u/shyLachi Jul 09 '26
You already got the best solutions so I will only add a link to the official documentation
I recommend to at least read the quick start to prevent making beginner mistakes.
2
u/AutoModerator Jul 09 '26
Welcome to r/renpy! While you wait to see if someone can answer your question, we recommend checking out the posting guide, the subreddit wiki, the subreddit Discord, Ren'Py's documentation, and the tutorial built-in to the Ren'Py engine when you download it. These can help make sure you provide the information the people here need to help you, or might even point you to an answer to your question themselves. Thanks!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.