Dialogue. Am I doing it wrong

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
Westeford
Regular
Posts: 151
Joined: Mon Jun 19, 2017 4:43 pm
Completed: 12 Hours to Die
Projects: Project Premonition
itch: westeford
Location: United States
Contact:

Dialogue. Am I doing it wrong

#1 Post by Westeford »

I just started coding my game, here's a sample of what I'm doing.

Code: Select all

 
    show argus_smile
    with Dissolve(.3)
    a "...and that's why Grandma stopped calling."
    hide argus_smile
    show cecille_heh
    c "..."
    hide cecille_heh
    show tom_heh
    with Dissolve(.3)
    show tom_smile
    "..."
    hide tom_smile
    show tom_heh
    t "eheh..."
    hide tomoheh
    show bill_heh
    with Dissolve(.3)
    b "..."
    hide bill_heh
    with Dissolve(.3)
I can't help but think i could be doing this in a much more efficient manner. Each character has many different images with varying emotions. whenever I switch a character's emotion, I have to hide the previous one then show the new one. And whenever I switch images whether it's the background or the sprites, I always have to say with dissolve so that the transitions aren't super jarring.
I guess what I'm asking is, what could I be doing to cut down on the repetition and save space?

irredeemable
Regular
Posts: 78
Joined: Thu Feb 08, 2018 7:57 am
Contact:

Re: Dialogue. Am I doing it wrong

#2 Post by irredeemable »

Well, in general, the first word of your image definition is the tag and showing an image with the same tag will replace the existing image. So if your images were named 'tom smile' and 'tom heh', for example, you wouldn't have to hide one before showing the other. More specifically, here it looks like you want to be using side images.

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: Dialogue. Am I doing it wrong

#3 Post by Milkymalk »

Also, it seems like you only show one sprite at a time, so you could have them all use the same tag, like 'pic tom_smile' and 'pic bill_heh'. Showing one will automatically hide the other.

Unless you are effectively using side images, then just go with what irredeemable wrote.
Crappy White Wings (currently quite inactive)
Working on: KANPEKI!
(On Hold: New Eden, Imperial Sea, Pure Light)

Post Reply

Who is online

Users browsing this forum: Google [Bot]