title: Endless Scrolling Background in SpriteKit
body: <p>I am attempting to make a side scrolling game using Apple's SpriteKit. When wanting to make a endless scrolling background I came across this <a href="https://stackoverflow.com/questions/19349168/sprite-kit-side-scrolling">answer</a>. </p>
  
  <p>After implementing the solution it does appear to work <strong>although</strong> it drops my FPS significantly. This is probably due to the fact that the images positions are being recalculated on every frame.</p>
  
  <p>I feel like it would be much better if I could use one or more <code>SKAction</code> calls to take care of this animation for me but I'm not certain how to implement it. </p>
  
  <p>Thoughts?</p>
  
  <p>The code I have so far in my scene class (this only animates the background across the screen once though)</p>
  
  <pre><code>- (void)addBackgroundTileAtPoint:(CGPoint)point {
  
      SKSpriteNode *bg = [SKSpriteNode spriteNodeWithImageNamed:@"background"];
      bg.anchorPoint = CGPointZero;
      bg.position = point;
      bg.name = @"background";
      bg.zPosition = -99;
      [self addChild:bg];
  
      SKAction *sequence = [SKAction sequence:@[
          [SKAction moveByX:-(bg.size.width * 2) y:0 duration:10],
          [SKAction removeFromParent]
      ]];
      [bg runAction: sequence];
  }
  </code></pre>