title: Smooth animation in Cocos2d for iOS
body: <p>I move a simple <code>CCSprite</code> around the screen of an iOS device using this code:</p>
  
  <pre><code>[self schedule:@selector(update:) interval:0.0167];
  
  - (void) update:(ccTime) delta {
      CGPoint currPos = self.position;
      currPos.x += xVelocity;
      currPos.y += yVelocity;
  
      self.position = currPos;
  }
  </code></pre>
  
  <p>This works however the animation is not smooth. <strong>How can I improve the smoothness of my animation?</strong> </p>
  
  <p>My scene is exceedingly simple (just has one full-screen <code>CCSprite</code> with a background image and a relatively small <code>CCSprite</code> that moves slowly).</p>
  
  <p>I've logged the ccTime delta and it's not consistent (it's almost always greater than my specified interval of 0.0167... sometimes up to a factor of 4x). </p>
  
  <p>I've considered tailoring the motion in the update method to the delta time (larger delta => larger movement etc). However given the simplicity of my scene it's seems there's a better way (and something basic that I'm probably missing).</p>