How do I eliminate jerkiness/tearing when fullscreen

Get help using Construct 2

Post » Thu Apr 28, 2016 5:17 pm

Then it may be your system.
The usual suspect for jerky cameras is pixel rounding, but the system scroll is not bound by it. In other words it can scroll to sub pixels, and that's usually what lerp will give you.
Image ImageImage
B
168
S
50
G
164
Posts: 8,233
Reputation: 105,585

Post » Thu Apr 28, 2016 8:05 pm

but your camera completely jerks. Like, I stop in place and the camera slowly shifts into place, and then, half a second after it's stopped, it clicks one more pixel! It's very distracting. Apparently you have pixel rounding on as well. It doesn't scroll to subpixels.

And anyway even if yours did (it doesn't), I don't want mine to.
B
28
S
12
G
4
Posts: 193
Reputation: 4,581

Post » Thu Apr 28, 2016 10:37 pm

I guess what I really want to know is: how can I move the player 2 pixels per frame and the background 1 pixel per frame. Consistently. At any size, even fullscreen (where 1 game pixel is obviously going to be huge)

Even when I scale up the 128px layout to full screen, 1 pixel per frame would still read smooth.

And then I can speed up. @r0j0hound ? @Magistross ?
B
28
S
12
G
4
Posts: 193
Reputation: 4,581

Post » Fri Apr 29, 2016 12:17 am

christina wrote:but your camera completely jerks. Like, I stop in place and the camera slowly shifts into place, and then, half a second after it's stopped, it clicks one more pixel! It's very distracting. Apparently you have pixel rounding on as well. It doesn't scroll to subpixels.

And anyway even if yours did (it doesn't), I don't want mine to.


Nope it's going to subpixels, and its why its snapping.
Try putting round(lerp(()))
Image ImageImage
B
168
S
50
G
164
Posts: 8,233
Reputation: 105,585

Post » Fri Apr 29, 2016 12:33 am

I tried round(lerp()) and ceil, and floor :/ nothing. I want the player to consistently move 2 pixels per frame. Not per second, not per tick. Is that doable?
B
28
S
12
G
4
Posts: 193
Reputation: 4,581

Post » Fri Apr 29, 2016 12:49 am

Define frame.
A frame happens every tick.
Unless you think it's something else?
Image ImageImage
B
168
S
50
G
164
Posts: 8,233
Reputation: 105,585

Post » Fri Apr 29, 2016 3:21 am

Did you update your capx? I thought about the round(lerp( thing newt mentioned and when I went to try it's already there. It actually fixed the tearing for the most part here.

I recorded it:. https://a.pomf.cat/owzfff.webm
B
122
S
42
G
40
Posts: 846
Reputation: 27,994

Post » Sat Apr 30, 2016 10:45 am

@andreyin @newt the tearing did indeed go away! Victory!

Defining frame now: Frame as in, animation. As in, if you record the screen, as in andreyin's capture for example, each *frame* is not a construct 2 tick, it's a construct 2 frame. Like fps. I don't know how else to explain it.

And right now, even though tearing is fixed, jerky movement is NOT fixed. Have a look:

Image

What i want is that every frame, the screen scrolls by 1px. What's happening instead is (due to the rounding probably? or something else?) the background moves a different number of pixels each time. 1, 2, 3, even none.

This is very noticeable in fullscreen.

Is there a way to fix it? Is it just a matter of finding the correct player.Platform.MaxSpeed ? Is it something else? @Ashley?
B
28
S
12
G
4
Posts: 193
Reputation: 4,581

Post » Sat Apr 30, 2016 10:57 am

The only other thing I can think of is that it might be because it's scaled.
Also there are some differences between fullscreen and the no window fullscreen.
Anyway the frame you are talking about is when it's drawn.
I believe the tick is basically between frames.
Image ImageImage
B
168
S
50
G
164
Posts: 8,233
Reputation: 105,585

Post » Sat Apr 30, 2016 1:29 pm

OK, when it's drawn. So how can I make the game draw 1 pixel movement per frame? Instead of irregular increments of pixels?
B
28
S
12
G
4
Posts: 193
Reputation: 4,581

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: lolsuperscratch, RobertMKD, tarek2 and 9 guests