Whats the secret of jitter free paralax?

0 favourites
  • 13 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • 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? <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    http://fldr.de/paralax

  • 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.

  • http://fldr.de/paralax2

    with linear sampling

    http://fldr.de/paralax3

    with point sampling and pixelrounding

    both are better but not really optimal

  • 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

  • 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

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • oh yes! Thank you! i didnt even thought about that the scrol lto could be the issue! will try that!

  • Is that the actual size of the images, or are you upscaling?

  • yes, its in fullscreen letterbox integer scale, the tiles (tilemap) and the player are 16*16, background images are tiledbackgrounds, layoutsize is 240px*160px.

  • 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.

  • newt you mean if i want to show it correct on lets say an 1920*1080 monitor the layout and assets must be these dimensions?

    Thats the horror, i wanted the game to run at mobile devices which have a variety of different resolutions.

  • You shouldn't need to upscale everything, but to keep the blocky look you will need to for the background parts.

  • ok then i will try that! Thank you!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)