Intepolate camera jittery

andikmandikm Member, PRO Posts: 26

I have a button that interpolates the camera's X position from 0 to 960, duration 1, set to linear, but it is very jittery.

I have tried adding a constant speed rule and attribute, but it still does not look smooth. Does anyone have any suggestions to make the camera move smooth as butter?

Best Answers

Answers

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Does this demo seem jittery?

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • andikmandikm Member, PRO Posts: 26

    No your demo looks quite smooth. Not sure why my project jitters the camera then. I have done a test project (only 108KB) with nothing but the button and background and it still jitters.

  • andikmandikm Member, PRO Posts: 26

    @Summation Thanks ! I can use this with some rules and control the speed better.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    @andikm said:
    I have done a test project (only 108KB) with nothing but the button and background and it still jitters.

    Any chance you can upload that file?

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • andikmandikm Member, PRO Posts: 26

    Test file uploaded. Please take a look. It probably only looks minor but it is noticeable.

  • SummationSummation Member, PRO Posts: 476

    @andikm Hey I took a look at your demo and it was a bit jittery on my end, too.
    So, I took out the background images to see if that would help and it was still jittery.
    I think the interpolate behavior is the problem.

  • andikmandikm Member, PRO Posts: 26

    Super thanks! I am not going crazy then. I'll compensate the end values or try Summation's solution. Thanks for checking it out.

  • SocksSocks London, UK.Member Posts: 12,822

    @tatiang said:
    I do see what you mean and I'm guessing it's due to a glitch with Interpolate when it reaches the endpoint values. See this post by Socks: http://forums.gamesalad.com/discussion/comment/418056/#Comment_418056.

    The interpolation glitch issue was fixed a while back, interpolate works just fine now (thankfully!).

  • andikmandikm Member, PRO Posts: 26

    @Socks said:
    The interpolation glitch issue was fixed a while back, interpolate works just fine now (thankfully!).

    Socks, can you check my test file above? Not sure why it is not smooth then...

  • SocksSocks London, UK.Member Posts: 12,822

    @andikm said:
    Socks, can you check my test file above? Not sure why it is not smooth then...

    What is it I am looking for, I played it and it seemed pretty smooth to me, can you be a little more specific ?

  • MantoManto Member Posts: 796
    edited April 2015

    @andikm
    I have seen that jittery in GS games for at least a couple of years. In many games it's not easy to see, but with certain behaviors (for example interpolate, move, move to) and enough fast movement it is fairly noticeable. In a game with continuous movement it appears to happen around every 6.5 seconds.

    There seems to be something wrong with the behaviors that do something over time. I'm guessing it's because they have their own timers and they are not in sync with the main timer (or game loop) that draws everything.

    If you want to avoid jittery use constrain attribute or loop behaviors. I tried setting the linear velocity attribute, but the jittery was still there.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    @Socks said:
    The interpolation glitch issue was fixed a while back, interpolate works just fine now (thankfully!).

    Doh! Thought I was keeping up with things pretty well... :o

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • SocksSocks London, UK.Member Posts: 12,822

    @tatiang said:
    Doh! Thought I was keeping up with things pretty well... :o

    I finally broke GameSalad's will with my relentless complaining :smile:

  • andikmandikm Member, PRO Posts: 26

    @Socks
    There is a tiny stutter at the end of each scroll, but never mind I am going use an alternative method.

    @Manto said:
    andikm
    If you want to avoid jittery use constrain attribute or loop behaviors. I tried setting the linear velocity attribute, but the jittery was still there.

    Thanks, I'll will use a constraint to control the speed.

Sign In or Register to comment.