I'm learning ios game programming and I need to create my own tile background - we're migrating an infinite-map style game from java.
I have the following code rendering our background tile graphics inside a loop:
SKSpriteNode *sprite = [SKSpriteNode spriteNodeWithImageNamed:@"shallow_1.png"];
sprite.position = CGPointMake(x,y);
[self addChild:sprite];
However, I'm trying to find out how to properly batch render in spritekit. In java/opengl we'd apply the texture, add all the render positions, and then render everything at once - saving performance.
How can I properly batch render these tiles using spritekit? I can't find any information.
SKSpriteNode *sprite = [SKSpriteNode spriteNodeWithImageNamed:@"shallow_1.png"];
every single iteration of the loop? Seems unnecessary and in another languages we'd load it once, and clone. In opengl we apply the texture once, and just pass a list of vertices. - helion3