Please fix Point Sampling (w/ Pixel Rounding) flickering!

Discussion and feedback on Construct 2

Post » Sun Jul 16, 2017 9:58 pm

Here's a video example of what am I talking about :
https://www.youtube.com/watch?v=-e5fUSC3RIE

I do believe that I might just be doing something wrong, so if someone could guide me to remove these stripes, please do. :cry:

It puts a heavy strain onto players eyes and ruins my game.
Thanks for any help in advance!
B
6
S
2
Posts: 77
Reputation: 1,292

Post » Mon Jul 17, 2017 3:59 am

Hey Max. The thing about pixel rounding is that it will ensure that the pixels are only ever in 1 spot. This means instead of a perfectly smooth motion like you get with linear sampling (where it actually moves between pixels) you can sometimes end up with slightly jaggy movement.

Switch to linear sampling. If you hate the way your image is now distorted, try importing a big version of the car and scale it down. You now have the best of both worlds with the downside being that you are using large assets :/

In a small game though that shouldn't matter for you.
ImageImage
B
109
S
23
G
7
Posts: 1,062
Reputation: 12,708

Post » Mon Jul 17, 2017 8:47 am

Hello! Thank you for a quick reply.
I would not mind the movement being a bit jittery and moving one pixel at a time (the way it's set up that the car can only have int as its position)

I have a problem with weird lines going over my sprite as it moves; which should NOT occur on pixel rounding unless its bugged or I'm dumb.
B
6
S
2
Posts: 77
Reputation: 1,292

Post » Mon Jul 17, 2017 11:28 am

The sprite is rotated yeah? Though sprites snap to game resolution integers with pixel rounding on, everything is still drawn at screen resolution so when you rotate a sprite, the sprite gets rotated with as much pixel precision as the screen resolution allows, basically. That's probably where your lines are coming from. If you want to avoid that you can try using low-quality fullscreen scaling instead.
B
36
S
16
G
6
Posts: 526
Reputation: 7,510

Post » Mon Jul 17, 2017 11:59 am

There is a reason why pixel rounding is there, to improve performance at a cost of less smother gameplay, you cant "Fix" it without making the game more performance heavy which will defeat the purpose of pixel rounding in first place.

You want smother movement don't use pixel rounding, you can make pixel rounding look more smoother by making the screen resolution bigger then it will be less noticeable, but bigger resolution more stuff on the screen == reduced fps, so it wont really improve performance or it will by such a small amount it will be neglectable and you might as turn it off.
Like my work? Fallow me on social media, and see my games on the arcade.
B
7
S
5
G
8
Posts: 282
Reputation: 4,825

Post » Mon Jul 17, 2017 12:25 pm

It looks like the object is slightly rotated. Small rotations often don't look good with point sampling since aliasing becomes very obvious, as you have noticed. This is a normal result in computer graphics, and this is why most games either use linear sampling, or use a retro-style which generally avoids rotation.
Scirra Founder
B
386
S
229
G
87
Posts: 24,207
Reputation: 191,692


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 11 guests