For a lot of the objects in my game I use cocos2d actions to move them around, but then for some of them I move myself based on angles and velocity. I have set up a ticking selector, like:
[self schedule:@selector(tick:)];
And then the function looks like this:
- (void) tick:(id)sender {
// update position
CGFloat x = self.position.x + velocity*cos(angle*M_PI/180);
CGFloat y = self.position.y + velocity*sin(angle*M_PI/180);
self.position = CGPointMake(x, y);
}
But these objects seems to move much slower in the Simulator than when testing on my iPod Touch. When you just schedule a selector without an interval, how often does that selector get called? If I want the Simulator and iPod Touch to update at the same speeds, would it make sense to initialize the selector more like this instead?
[self schedule:@selector(tick:) interval:0.033f];