Images containing 1 pixel lines cause flickering

Bugs will be moved here once resolved.

Post » Sat Sep 24, 2016 7:07 am

Problem Description
When using a tilemap, tiledbackground or even a single sprite made of 1px lines those lines start to flicker on movement.
But the problem nearly disappears when turning off WebGL.
First i started an "How To"-thread to ask if i doing something wrong, i am justing adding the link as reference:
how-to-prevent-flickering-on-tilemaps_t182182

Attach a Capx
https://www.dropbox.com/s/kruahx1t1fb6v ... .capx?dl=0

Description of Capx
It contains a tilemap made of 1px lines. on top there is a blue rectangle-sprite having 8-direction behavior so you can move across the map.

Steps to Reproduce Bug
  • just move around using arrowkeys to cause movement of tilemap
  • or: assign the 8-direction behavior to the tilemap to move it directly

Observed Result
heavy flickering of those lines depending on movement-direction.

Expected Result
Nothing should flicker like rendering without WebGL

Affected Browsers
  • FireFox: YES
  • NWjs: YES

Operating System and Service Pack
Win 10

Construct 2 Version ID
r233 (stable)
B
4
Posts: 15
Reputation: 232

Post » Sat Sep 24, 2016 10:38 am

I got curious & tried it both WebGL "On" & "Off" but I see both state still flickering. Wait. Isn't that how graphics work? I'm not entirely sure but I think that is how graphic cards draw. As the screen moves it can't entirely keep up that causes the flickering.
The Things you can create is only limited by your imagination. If you don't have the skills then use your motivation as a natural force to exceed all expectations. Chadori RebornXD
B
67
S
22
G
90
Posts: 1,125
Reputation: 60,036

Post » Sat Sep 24, 2016 2:57 pm

Closing as not a bug: you're just seeing the effect of linear sampling over sub-pixel positions. This is a normal result in computer graphics.

For pixel-perfect display, use the project settings 'Letterbox integer scale', Pixel rounding on, and 'Point' sampling.
Scirra Founder
B
403
S
238
G
89
Posts: 24,653
Reputation: 196,143

Post » Sat Sep 24, 2016 9:25 pm

After switching to "Letterbox integer scale", activating Pixel rounding and Point-sampling it is even worse than before. after loading the game only vertical lines are shown. and if i move around those vertical lines start to flicker and sometimes disappear completely. i have no idea what i am doing wrong.
But still on my dev-system it helps just to deactivate WebGL...
B
4
Posts: 15
Reputation: 232


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 6 guests