#2D game pixel flickering

1 messages · Page 1 of 1 (latest)

burnt furnace
#

Hello, I have a problem. I’m making a 2D game with a moving camera, but when the camera moves, the pixels at the edges of my sprites are flickering.

loud rover
# burnt furnace Hello, I have a problem. I’m making a 2D game with a moving camera, but when the...

The only flickering visible to me is from the camera (or sprites relative to it) moving in rapidly snapped increments, which can create an illusion of flicker, especially on monitors which suffer from color ghosting
There's a test site dedicated to testing what kind and how severe ghosting your monitor has (but be warned it can be very eye-straining!)
The worse the effect is the bigger the snap / lower the FPS is in motion, and the greater the color difference between object and background are
The thin bright line on the tile edge can cause ghosting not only relative to the background, but against the rest of the of the tile itself
In addition to your monitor's ghosting, another thing to look at is how you're moving the camera or if you're snapping the sprites

burnt furnace
#

I don’t think the screen is the problem; it flickers the same way on my phone as well.

loud rover
loud rover
burnt furnace
#

Do I maybe need to scale up the sprites and then shrink the character to that size? That way the character would move fast in gameplay but relatively slower compared to the sprites, which might reduce the sprite flickering

#

If you'd like to review the project file I've prepared, I can send it to you.

loud rover
burnt furnace
loud rover
burnt furnace
#

I'll try it and get back to you.

loud rover
#

However, just letting the pixel perfect camera do the position snapping will not mean the problem will necessarily be fixed
Because the problem is caused by any kind of position snapping at its core

#

But it may be an improvement

burnt furnace
#

Sad

loud rover
#

Many just don't care if it's actually clean, and such problem don't always show up on video
Or occur at all, if the variables and circumstances just happen to align in a way where the visual artifacts are not noticeable

burnt furnace
burnt furnace
#

transform.position +=Vector3.right* direc * speed * Time.deltaTime;

#

It actually seems to have gotten worse hahaha.

loud rover
#

This isn't really a sharp pixel style so either you shouldn't be using any kind of snapping or pixel perfect camera at all

#

If you do use pixel perfect camera component, you should be using it with 1:1 pixel ratio
That can help preserve one pixel wide details, but isn't necessary and even then it may still cause one pixel wide blurring in motion