Sprites "flash" during transitions?

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
Jae
Regular
Posts: 192
Joined: Sun Sep 13, 2015 5:41 pm
Projects: Pokémon Academy Life
Location: New York, NY
Contact:

Sprites "flash" during transitions?

#1 Post by Jae » Sun Dec 06, 2015 1:51 am

Odd problem I've noticed without easy replication, unfortunately, but hopefully someone's encountered this in the past and can help explain.

There are three expressions for the character on the left in the following .gif sample:
1. Open eyes/open mouth (norm2)
2. Open eyes/closed mouth (norm)
3. Closed eyes/open mouth (think2)

Image

The above shows that the sprite on the left "flashes" while transitioning between the second and third expressions.

Code for the .gif segment:

Code: Select all

show cheren norm2 at replace
ch "\"Thank you for the help.\""
    
show cheren norm at replace
show clyde happy at replace
rc "\"Enjoy your day, Champs!\""
show clyde norm at replace
    
hide clyde norm with fadeoutright
    
show cheren think2 at replace
ch "\"I'm going ahead to check.\""
"replace" is a custom transition defined elsewhere as:

Code: Select all

transform replace:
    on replaced:
        alpha 1.0
        linear 0.2 alpha 0.0
    on replace:
        linear 0.2 alpha 1.0
The problem with this is that I never know when that "flash" may occur or why. Sometimes it happens and sometimes it doesn't.

At first I thought it was only during test runs, but I've tested in a build distribution and the "flash" can randomly occur there, too. And it's not even consistent with sprites. Sometimes it happens to another character when it was perfectly fine previously. Sometimes it flashes for a while and I reload the game and the flash disappears.

User avatar
Jae
Regular
Posts: 192
Joined: Sun Sep 13, 2015 5:41 pm
Projects: Pokémon Academy Life
Location: New York, NY
Contact:

Re: Sprites "flash" during transitions?

#2 Post by Jae » Sun Dec 06, 2015 4:04 am

I may or may not have stumbled upon the cause... but I still don't know for sure yet.

I have the following defined as well:

Code: Select all

define fadeoutleft = ComposeTransition(Dissolve(0.5), before=easeoutleft)
define fadeinright = ComposeTransition(Dissolve(0.5), after=easeinright)
define fadeoutright = ComposeTransition(Dissolve(0.5), before=easeoutright)
define fadeinleft = ComposeTransition(Dissolve(0.5), after=easeinleft)
define fadeinbottom = ComposeTransition(Dissolve(0.5), after=easeinbottom)
define fadeoutbottom = ComposeTransition(Dissolve(0.5), after=easeoutbottom)
Whenever a character fades prior to using "replace," a flash occurs.

I have no idea why this would happen.

User avatar
Jae
Regular
Posts: 192
Joined: Sun Sep 13, 2015 5:41 pm
Projects: Pokémon Academy Life
Location: New York, NY
Contact:

Re: Sprites "flash" during transitions?

#3 Post by Jae » Sun Dec 06, 2015 11:55 pm

Another update: so the cause may not actually be because of the "fadeout"/"fadein" transitions as someone testing the game for me said he caught a "flash" instance elsewhere.

I looked at the code and there were no other transitions other than the "replace" one. I could not replicate this.

I have been able to replicate the flashing effect due to the custom defined "fadeout"/"fadein" transitions.

Has anyone experienced anything like this before? I'm running version 6.99.7.858

User avatar
Jae
Regular
Posts: 192
Joined: Sun Sep 13, 2015 5:41 pm
Projects: Pokémon Academy Life
Location: New York, NY
Contact:

Re: Sprites "flash" during transitions?

#4 Post by Jae » Tue Dec 08, 2015 1:40 am

...Stumped :/

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: Sprites "flash" during transitions?

#5 Post by xela » Tue Dec 08, 2015 4:37 am

It's very hard to trace down these errors without access to project. You could strip down the code to bare minimum + just the two sprites and upload it somewhere.

===
I'd start by renaming replace func with ATL instructions, although not a reserved name, maybe it gets in the way somehow... it's not likely but that's the first thing that stands out. Otherwise, investigation in what's going would be required by someone who knows how replace/(d) work internally, sadly I've never looked into that myself :(
Like what we're doing? Support us at:
Image

User avatar
Jae
Regular
Posts: 192
Joined: Sun Sep 13, 2015 5:41 pm
Projects: Pokémon Academy Life
Location: New York, NY
Contact:

Re: Sprites "flash" during transitions?

#6 Post by Jae » Tue Dec 08, 2015 1:09 pm

Thanks for the input. I'll keep searching and hopefully there's something I can work with. Right now it feels like a dead end.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], _ticlock_