[solved] Bug: flicker at fade in and out.

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
Jeeper
Party member
Posts: 554
Joined: Tue Mar 12, 2013 7:11 pm

[solved] Bug: flicker at fade in and out.

Post by Jeeper » Sun Aug 04, 2013 8:44 pm

I have had an issue with my game for a long time where randomly It will get a bug and flicker while trying to fade in and out. It was just recently when I discovered that the game viewtopic.php?f=5&t=33349&start=0 Slimeball also has this issue for me. I wonder if it is something Löve specific, if there is some fix, or if its another variable that is messing it up (Like Windows 8 etc).
Last edited by Jeeper on Tue Aug 06, 2013 12:16 pm, edited 1 time in total.

davisdude
Party member
Posts: 1154
Joined: Sun Apr 28, 2013 3:29 am
Location: North Carolina

Re: Bug: flicker at fade in and out.

Post by davisdude » Sun Aug 04, 2013 8:48 pm

No issues for me with slime ball. Maybe you could try to replicate the problem, but I'd be willing to bet that your graphics card is at blame.
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim

User avatar
Jeeper
Party member
Posts: 554
Joined: Tue Mar 12, 2013 7:11 pm

Re: Bug: flicker at fade in and out.

Post by Jeeper » Sun Aug 04, 2013 9:25 pm

Made a quick video, http://www.youtube.com/watch?v=rNDNRIQ3 ... e=youtu.be.

My graphic card is; Nvidia GTX 660M 2G GDDR5 (if that is to any use).

davisdude
Party member
Posts: 1154
Joined: Sun Apr 28, 2013 3:29 am
Location: North Carolina

Re: Bug: flicker at fade in and out.

Post by davisdude » Sun Aug 04, 2013 9:55 pm

I don't know about the quality ort of thif the card, I'm notgood with that sort of thing. But I know that's what it is.
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim

User avatar
RedHot
Citizen
Posts: 87
Joined: Mon May 27, 2013 2:43 pm
Location: Poland

Re: Bug: flicker at fade in and out.

Post by RedHot » Mon Aug 05, 2013 11:16 am

Share the love file

User avatar
Jeeper
Party member
Posts: 554
Joined: Tue Mar 12, 2013 7:11 pm

Re: Bug: flicker at fade in and out.

Post by Jeeper » Mon Aug 05, 2013 12:47 pm

RedHot wrote:Share the love file
You can get the slimeBall.love from viewtopic.php?f=5&t=33349&start=0

User avatar
RedHot
Citizen
Posts: 87
Joined: Mon May 27, 2013 2:43 pm
Location: Poland

Re: Bug: flicker at fade in and out.

Post by RedHot » Mon Aug 05, 2013 5:29 pm

Can you actually reproduce the problem with the least code possible?

User avatar
Azhukar
Party member
Posts: 478
Joined: Fri Oct 26, 2012 11:54 am

Re: Bug: flicker at fade in and out.

Post by Azhukar » Mon Aug 05, 2013 5:36 pm

Looks like a missing/overflowed love.graphics.setColor() call to me.

User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Bug: flicker at fade in and out.

Post by raidho36 » Mon Aug 05, 2013 6:05 pm

Most likely. Video driver issue would've had constant flickering rather than on peak point only.

User avatar
Jasoco
Inner party member
Posts: 3651
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Bug: flicker at fade in and out.

Post by Jasoco » Tue Aug 06, 2013 7:16 am

I'm betting that's it too. Try changing line 393 to the following:

Code: Select all

love.graphics.setColor(0, 0, 0, math.max(0, math.min(255, flashAlpha)))
It'll clamp the flashAlpha value between 0 and 255. See, if setColor recieves a number less than 0 or more than 255 it wraps so 256 becomes 0 and -1 becomes 255. Which results in the flickering you are seeing. So you need to clamp the flashAlpha variable to prevent this.

Post Reply

Who is online

Users browsing this forum: wilco and 7 guests