scrolling and filtering question..

This forum is currently in read-only mode.
  • I have been working with linear filtering on my game and decided to switch over to point filtering as the graphics were a little blurry, however the scrolling was juddery - is there any method to prevent this?

    I would really like to switch over to point filtering as it looks SO much better and crisper, but the scrolling just looks awful..

    My scrolling varies in speed , but on the whole relatively slow based on a 2D camera..

    Any assistance or explanations into the reason so I better understand would be appreciated!

    thanks!

  • You can try to round your scrolling to integer values if you are using events to scroll (don't use the "Center view on me" attribute).

  • Ah, yes..I am using center view on me.. What are my alternatives? And what is it the CVOM option does that makes it do that?

  • I'm mostly just guessing but odds are center view on me will scroll to your object position (which can be less than a whole pixel) even when in point filtering, so your option instead is the System action "Scroll To Position" and use System rounding of the positions for X and Y to scroll to.

  • Thanks for that info, would you be so kind as to can you give me an example of how to execute the rounding?

    I tried the other method of centering and it worked but I have no idea how to execute the rounding to see if this actually fixes the scrolling, sorry!

  • Sorry for a late reply work3, been pretty busy this past week. I might be able to make an example over the weekend though!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No need for apologies, any assistance is appreciated! - just to be clear I am just asking for a text example of the rounding expression, not any code!!

  • I wanted to see first hand how that suggestion would work out and it seems to actually make it a bit more jerky than even default scrolling, but I added another mode of scrolling to this cap for you to try: https://dl.dropboxusercontent.com/u/471 ... olling.cap

    Keyboard 1 = Default (system) scrolling to Sprite.X and Sprite.Y

    Keyboard 2 = Rounded (scrolling to Round(Sprite.X) and Round(Sprite.Y))

    Keyboard 3 = Lerp

    Lerp is a command where you use Lerp(Start, End, Percent) to get a value that is a percentage between the start and end.

    Eg: Moving an object to 10% between an X position of 0 and 100, which is 10px, would be done by Sprite.X = Lerp(0, 10, 0.1) as 0.1 is 10%

    For the scrolling, we use Lerp(Scroll, Sprite, 0.1) in general to always scroll to 10% of the difference between the current Scroll (X or Y) and Sprite (X or Y). When the sprite slows down I sped up the % to make it less jerky. I would definitely recommend experimenting more with an accelerated camera though if you find directly following the object is laggy, maybe even one where the camera only follows the player after they are a certain number of pixels away from the center.

    Hope that helps!

  • Thankyou SO much!

    I will take a look at these and let you know my findings - another programmer showed me the rounding , and it was fine until the speed of my scroll started to decelerate..

    I hope this will work!

    regardless, again, thanks SO much for your assistance!!

  • Anytime! Hope it helps

  • hey there - I have been trying out a few of the filtering settings but as I am using an RTS object to control the camera, the rounding makes it judder as it slows down at points, and it seems the sprites shimmer terribly at lower resolutions - I will keep trying variations though!!

  • Hmm, I never thought of RTS to control the camera, and can certainly see how that might cause some jitter. What if you use RTS on an invisible sprite and then use the lerp scrolling to follow it when it's more than maybe 3 pixels away from the scrollx and scrolly?

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