veggiesaurus at February 12th, 2012 14:54 — #1
I’ve notices that some menu animations in my cocos2d-x project (generally simple fade and ease actions) don’t always run as smoothly as I’d expect on a galaxy s2. If anybody else has run into similar problems, I believe I’ve figured it out: I think the issue has to do with vsync. I found that you can ensure that your simple animations run as smooth as possible by decreasing the animation interval. I suspect the problem crops up when you have an animation interval that is very close to (or exactly equal to) the refresh interval. In this case, any delays can cause a frame to get delayed until the next refresh.
The solution that I’ve been using is simply:
pDirector->setAnimationInterval(1.0 / 70);
Has anyone else figured out how to deal with this in a more graceful way?
zhenmuron at July 28th, 2012 13:02 — #2
I’ve been having the same problem.
I felt that a game I am porting from cocos2d-iPhone was feeling a bit choppy on Android, and tried setting up a scheduled update to check the dt value.
At an interval of 1.0f/60.0f I should be seeing values around 0.0167 but instead I was getting 0.033. By changing the animation interval of the director to 1.0f/80.0f the values looked much better and the game ran/looked smoother. Not sure what could be the problem. I am testing on a Galaxy S3.