Thanks a lot for your reply. I tried this now. My thought was that it should not matter where the timeDeltaFactor is clipped or if it is clipped because it should always be in sync as all objects get the same delta time to respond to. I've also logged the x position of the objects so that you can see the drift.
My new test setup is two scripted spawners that spawn a projectile every 0.5 seconds to the right. They should be in sync, but they are not after a while. This is how my log starts:
2011-04-08 12:57:12.658 cocos2d-project[94819:207] main loop update delta: 0.033317
2011-04-08 12:57:12.692 cocos2d-project[94819:207] timedelta: 2.024640
2011-04-08 12:57:12.693 cocos2d-project[94819:207] x position: 57.086239
2011-04-08 12:57:12.693 cocos2d-project[94819:207] timedelta: 2.024640
2011-04-08 12:57:12.694 cocos2d-project[94819:207] x position: 57.086239
2011-04-08 12:57:12.695 cocos2d-project[94819:207] main loop update delta: 0.033744
2011-04-08 12:57:12.725 cocos2d-project[94819:207] timedelta: 1.975080
2011-04-08 12:57:12.726 cocos2d-project[94819:207] x position: 63.999020
2011-04-08 12:57:12.726 cocos2d-project[94819:207] timedelta: 1.975080
2011-04-08 12:57:12.727 cocos2d-project[94819:207] x position: 63.999020
2011-04-08 12:57:12.728 cocos2d-project[94819:207] main loop update delta: 0.032918
2011-04-08 12:57:12.742 cocos2d-project[94819:207] timedelta: 1.013460
2011-04-08 12:57:12.744 cocos2d-project[94819:207] x position: 67.546127
2011-04-08 12:57:12.748 cocos2d-project[94819:207] timedelta: 1.013460
2011-04-08 12:57:12.750 cocos2d-project[94819:207] x position: 67.546127
The line with main loop update delta is the time delta from my main loop, it marks one cycle of movement. The timedelta lines are the timeDeltaFactor you suggested to log and the x position is the position of the object that is beeing moved. It starts out with two objects being perfectly in sync. Later when there are more shots flying around there should be pairs of projectiles with the same position.
Like this:
2011-04-08 12:57:14.652 cocos2d-project[94819:207] main loop update delta: 0.033332
2011-04-08 12:57:14.675 cocos2d-project[94819:207] timedelta: 1.999920
2011-04-08 12:57:14.676 cocos2d-project[94819:207] x position: 473.536804
2011-04-08 12:57:14.676 cocos2d-project[94819:207] timedelta: 1.999920
2011-04-08 12:57:14.677 cocos2d-project[94819:207] x position: 473.536804
2011-04-08 12:57:14.678 cocos2d-project[94819:207] timedelta: 1.999920
2011-04-08 12:57:14.679 cocos2d-project[94819:207] x position: 368.221680
2011-04-08 12:57:14.679 cocos2d-project[94819:207] timedelta: 1.999920
2011-04-08 12:57:14.680 cocos2d-project[94819:207] x position: 368.221680
2011-04-08 12:57:14.681 cocos2d-project[94819:207] timedelta: 1.999920
2011-04-08 12:57:14.681 cocos2d-project[94819:207] x position: 260.032318
2011-04-08 12:57:14.682 cocos2d-project[94819:207] timedelta: 1.999920
2011-04-08 12:57:14.682 cocos2d-project[94819:207] x position: 260.032318
2011-04-08 12:57:14.683 cocos2d-project[94819:207] timedelta: 1.999920
2011-04-08 12:57:14.683 cocos2d-project[94819:207] x position: 151.519257
2011-04-08 12:57:14.684 cocos2d-project[94819:207] timedelta: 1.999920
2011-04-08 12:57:14.684 cocos2d-project[94819:207] x position: 151.519257
But then the strange thing happens and the next iteration of the loop shows this:
2011-04-08 12:57:14.685 cocos2d-project[94819:207] main loop update delta: 0.033332
2011-04-08 12:57:14.708 cocos2d-project[94819:207] timedelta: 1.992120
2011-04-08 12:57:14.709 cocos2d-project[94819:207] x position: 480.509216
2011-04-08 12:57:14.729 cocos2d-project[94819:207] timedelta: 1.992120
2011-04-08 12:57:14.730 cocos2d-project[94819:207] x position: 375.194092
2011-04-08 12:57:14.730 cocos2d-project[94819:207] timedelta: 1.992120
2011-04-08 12:57:14.731 cocos2d-project[94819:207] x position: 375.194092
2011-04-08 12:57:14.732 cocos2d-project[94819:207] timedelta: 1.992120
2011-04-08 12:57:14.734 cocos2d-project[94819:207] x position: 267.004730
2011-04-08 12:57:14.735 cocos2d-project[94819:207] timedelta: 1.992120
2011-04-08 12:57:14.735 cocos2d-project[94819:207] x position: 267.004730
2011-04-08 12:57:14.736 cocos2d-project[94819:207] timedelta: 1.992120
2011-04-08 12:57:14.736 cocos2d-project[94819:207] x position: 158.491669
2011-04-08 12:57:14.751 cocos2d-project[94819:207] timedelta: 1.992120
2011-04-08 12:57:14.751 cocos2d-project[94819:207] x position: 158.491669
2011-04-08 12:57:14.752 cocos2d-project[94819:207] timedelta: 1.992120
2011-04-08 12:57:14.752 cocos2d-project[94819:207] x position: 165.464081
It's still 8 active projectiles, but the first and the last value stand alone, no pairs. Also the first value should maybe not even exist because at more than 480px in x direction projectiles should get destroyed.
This is the next itteration:
2011-04-08 12:57:14.754 cocos2d-project[94819:207] main loop update delta: 0.033202
2011-04-08 12:57:14.775 cocos2d-project[94819:207] timedelta: 3.999480
2011-04-08 12:57:14.777 cocos2d-project[94819:207] x position: 487.534973
2011-04-08 12:57:14.777 cocos2d-project[94819:207] timedelta: 3.999480
2011-04-08 12:57:14.778 cocos2d-project[94819:207] x position: 389.192261
2011-04-08 12:57:14.778 cocos2d-project[94819:207] timedelta: 3.999480
2011-04-08 12:57:14.779 cocos2d-project[94819:207] x position: 281.002899
2011-04-08 12:57:14.779 cocos2d-project[94819:207] timedelta: 3.999480
2011-04-08 12:57:14.783 cocos2d-project[94819:207] x position: 281.002899
2011-04-08 12:57:14.784 cocos2d-project[94819:207] timedelta: 3.999480
2011-04-08 12:57:14.784 cocos2d-project[94819:207] x position: 172.489853
2011-04-08 12:57:14.785 cocos2d-project[94819:207] timedelta: 3.999480
2011-04-08 12:57:14.785 cocos2d-project[94819:207] x position: 179.462265
2011-04-08 12:57:14.786 cocos2d-project[94819:207] timedelta: 3.999480
2011-04-08 12:57:14.789 cocos2d-project[94819:207] x position: 63.998180
2011-04-08 12:57:14.789 cocos2d-project[94819:207] timedelta: 3.999480
2011-04-08 12:57:14.790 cocos2d-project[94819:207] x position: 63.998180
2011-04-08 12:57:14.791 cocos2d-project[94819:207] timedelta: 3.999480
2011-04-08 12:57:14.792 cocos2d-project[94819:207] x position: 77.996361
Now there are 9 objects where there should be an even number... I'm beginning to wonder if the problem could be totally unrelated to my movement code and be caused by the way I delete my objects. I'll do some more logging on that one and assume for now that the timedelta is not the problem.
Edit: I tried to solve it by changing the way objects are deleted. This resulted in screwing up the object removal so that they don't get removed at all, but at least their speed stays in sync, which means I'm on the right track I think. :)
Thanks for your help Benihana!