0.025 equals 40 fps, that could be a bit steep depending on the rest of your game loop. It’s good to think about the relationship between framerate and percieved speed. When you increase framerate, you make the movement smoother, but only as long as you know how to calculate the motion. If you move the objects with by a fixed distance with each tick of the time, they will stutter, because the timer is not precise. (Think about it: 40 fps means 25 ms per frame. When the timer gets off by five milliseconds – not very much, is it? –, you change the frame time by 20 percent. It is not unusual for the time events to get off by 10–20 ms.)
This means that you have to calculate the real time delta from the last frame and move the objects according to it. A bit like this:
const int kDesiredModelFramerate = 50; // fps
const double kDesiredFrameTime = 1.0/kDesiredModelFramerate;
double now = CFAbsoluteTimeGetCurrent();
double delta = now - lastFrameTime;
double correction = delta/kDesiredFrameTime;
[object setX:object.x + step*correction];
This looks complicated, but isn’t. When it took 40 ms from the last frame, you know you are one frame “late”, since to keep the desired framerate of 50 fps you’d like to keep each frame under 20 ms. Therefore the correction
will be 0.04/0.02 = 2 and the usual movement step will get multiplied by 2 to make up for the lag. Now you can change the framerate as you wish – the percieved speed of the movement will stay the same, only the smoothness of the motion will change.
<voice class="Simon Peyton Jones">
Does that make sense?</voice>
There is a great article about game loops where you can read about this in more detail. It’s a must read for game programmer. The exact way to realize all this in Cocos2D can vary, but the point remains the same. Getting this issue should help you get things moving smooth and fast.