Sprite backgrounds
Posted
by Mattias Akerman
on Stack Overflow
See other posts from Stack Overflow
or by Mattias Akerman
Published on 2009-07-26T18:05:02Z
Indexed on
2010/05/07
3:08 UTC
Read the original article
Hit count: 354
cocos2d-iphone
|cocos2d
I use cocos2d for iphone and in my game I'm using a sprite as static background image.
I've noticed that when removing code for adding the sprite the framerate goes from ~30fps to over 40fps. Is it any other way to show a static background that is less expensive? I'm not moving the background sprite at all.
To code right now:
background = [Sprite spriteWithFile:@"t1_5.jpg"];
[self addChild:background z:0];
background.position = ccp(240, 160);
© Stack Overflow or respective owner