I've started using Cocos2d (v0.4.0) recently and encountered the same
problem as mentioned in the qouted year-old post below. It can be seen
in the test_tiles.py example, especially if you increase the max
speed. Basically the scrolling "jitters" when in motion.

Is there a better approach to smooth scrolling, or is this a problem
with ScrollingManager?

qouted:
"
I've noticed in both the 0.3 and svn cocos that scrolling with moving
sprites sometimes causes weird "vibration" rendering glitches which
look like a one pixel error interpolation issue or something.  If you
zoom in on the car in the test_tiles while it is scrolling and
rotated
you will notice it vibrates.
I found this issue making a very low resolution game where I was
trying to use the MoveTo action to move a sprite while focusing on
that sprite every frame. The sprite would jump back and forth a pixel
while it was moving in the same direction the scrolling manager was
scrolling.  If I manually moved the sprite with a velocity it would
have the same problem, but only when the call to set_focus was in the
layer's scheduled update or some higher level.  If i put the
set_focus
immediately after the sprite position change in the sprite's
scheduled
update method the vibrating would stop for that sprite but other
moving sprites in the scene would still have the problem.
Putting the test_tiles scroller.set_focus(car.x, car.y) in a new
scheduled update in the main scene separate from the car's update
causes the vibration to occur when moving without rotation as well.
I've been trying to track down this bug, but I admit not knowing
where
to look. I am wondering if inting or rounding floats to pixels
somewhere is causing the problem but changing the int conversions in
the scrolling manager back to floats didn't do anything. Or perhaps
the ordering of update, transform, and draw somewhere is causing
problems?
"

-- 
You received this message because you are subscribed to the Google Groups 
"cocos2d discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cocos-discuss?hl=en.

Reply via email to