title: How to draw a background fast in cocos2d?
body: <p>I'm toying with a small game on my iPad using cocos2d and I've run into some performance worries. I have a 512x512 image tiled as my background. That gives me around 40fps with 20 sprites (in a <code>CCSpriteBatchNode</code>), the code for the background is this:</p>
  <pre><code>CCSprite *background;
  background = [CCSprite spriteWithFile:@&quot;oak.png&quot; rect : CGRectMake(0,
                                                                     0,
                                                                     size.width,
                                                                     size.height)];
  background.position =  ccp( size.width /2 , size.height/2 );
          
  ccTexParams params = {GL_LINEAR,GL_LINEAR,GL_REPEAT,GL_REPEAT};
  [background.texture setTexParameters: &amp;params];
  </code></pre>
  <p>If I remove the background I get a solid 60fps.</p>
  <p>I've tried converting the image to PVRTC and that did give an extra fps or two. I get identical framerates using a 1024x768 image instead of the tiled version.</p>
  <p>Since my background will remain axis aligned, unscaled and generally static. I figure there should be a faster way to draw it than having it as a regular <code>CCSprite</code>?</p>
  <p><img src="https://i.stack.imgur.com/vWtYS.png" alt="alt text" /></p>