Intepolate camera jittery
andikm
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
-
tatiang Posts: 11,949
@andikm said:
Test file uploaded. Please take a look. It probably only looks minor but it is noticeable.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.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Answers
Does this demo seem jittery?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
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.
@Summation Thanks ! I can use this with some rules and control the speed better.
Any chance you can upload that file?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Test file uploaded. Please take a look. It probably only looks minor but it is noticeable.
@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.
Mathtap.com (Android) | Fridgemanager.com (Android) | Breakoutofspace.com (Android)
Super thanks! I am not going crazy then. I'll compensate the end values or try Summation's solution. Thanks for checking it out.
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...
What is it I am looking for, I played it and it seemed pretty smooth to me, can you be a little more specific ?
@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.
Doh! Thought I was keeping up with things pretty well...
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
I finally broke GameSalad's will with my relentless complaining
@Socks
There is a tiny stutter at the end of each scroll, but never mind I am going use an alternative method.
Thanks, I'll will use a constraint to control the speed.