## [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
Jeeper
Party member
Posts: 554
Joined: Tue Mar 12, 2013 7:11 pm

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

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.

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

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

### Re: Bug: flicker at fade in and out.

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.

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

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

### Re: Bug: flicker at fade in and out.

Share the love file

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

### Re: Bug: flicker at fade in and out.

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

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

### Re: Bug: flicker at fade in and out.

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

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

### Re: Bug: flicker at fade in and out.

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

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

### Re: Bug: flicker at fade in and out.

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

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.

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.

### Who is online

Users browsing this forum: wilco and 24 guests