Whats the secret of jitter free paralax?

Get help using Construct 2

Post » Wed Feb 25, 2015 8:54 pm

Hi,

im trying to make something with two paralaxing backgrounds but i cant achieve a result where it doesnt jitter/deform the background graphics.
Sampling is point, downscaling is low quality, fullscreen scaling is low quality, letterbox-integer scale.

the paralax of the first background layer is 48, the second one has 32 (because i had the feeling that maybe it needs "power of 2" sized numbers, no clue if its true because the jitter is still there), it was 25 and 50 before with alike results.

the player guy has also only power of 2 values, max speed 128, acceleration 256, deceleration 512..

does anyone have a tip? :)

http://fldr.de/paralax
B
37
S
11
G
5
Posts: 484
Reputation: 5,313

Post » Thu Feb 26, 2015 12:20 am

Does it still jitter if you set the Sampling to Linear? I know this isn't a real solution to your problem but I'm curious if that's the right area to even be looking for the problem in.
B
17
S
2
Posts: 66
Reputation: 1,382

Post » Thu Feb 26, 2015 11:42 am

http://fldr.de/paralax2
with linear sampling

http://fldr.de/paralax3
with point sampling and pixelrounding


both are better but not really optimal
B
37
S
11
G
5
Posts: 484
Reputation: 5,313

Post » Thu Feb 26, 2015 3:00 pm

http://fldr.de/paralax4
another try, i have the idea that the paralaxing has to be as fast as the ticks pers second or an integer multiplier of the FPS when pixelrounding is activated and stutter should be avoided


http://fldr.de/paralax5
this one sets the speed of the background every tick to FPS, it seems a bit better i think
B
37
S
11
G
5
Posts: 484
Reputation: 5,313

Post » Thu Feb 26, 2015 9:18 pm

ok, heres another try with construct2 r198 (it says in the release notes "There's also a tweak to try to improve the framerate smoothness..")
http://fldr.de/paralax6

not better i would say
B
37
S
11
G
5
Posts: 484
Reputation: 5,313

Post » Thu Feb 26, 2015 9:22 pm

Try panning the camera in whole numbers. Use int() if it is possible. Sometimes this really makes a big difference in movement of anything.

Seems like it calculates X=5 faster than X=5.342342535423436234562346235624564562456456245634563453455464547567.

Hope that helps.
B
28
S
8
G
4
Posts: 767
Reputation: 5,950

Post » Thu Feb 26, 2015 9:47 pm

oh yes! Thank you! i didnt even thought about that the scrol lto could be the issue! will try that!
B
37
S
11
G
5
Posts: 484
Reputation: 5,313

Post » Thu Feb 26, 2015 10:23 pm

Is that the actual size of the images, or are you upscaling?
Image Image
B
164
S
49
G
123
Posts: 7,778
Reputation: 84,010

Post » Thu Feb 26, 2015 11:29 pm

yes, its in fullscreen letterbox integer scale, the tiles (tilemap) and the player are 16*16, background images are tiledbackgrounds, layoutsize is 240px*160px.
B
37
S
11
G
5
Posts: 484
Reputation: 5,313

Post » Thu Feb 26, 2015 11:43 pm

So, no its not the actual size, and the images are "interpolated" by the browser which is the root of the issue, IE a pixel at this position may be interpolated differently at this other position.
Your solution is to upscale the textures to the wanted size, and then import them.
Image Image
B
164
S
49
G
123
Posts: 7,778
Reputation: 84,010

Next

Return to How do I....?

Who is online

Users browsing this forum: Baidu [Spider] and 2 guests