Is it possible to have CCSprite * sprite1
and CCSprite * sprite 2
combined? For example if you took a piece of white paper (sprite1)
and glued a red piece of paper with a cut out, reassembling transparent areas, (sprite2
) on top of the white paper to create a new CCSprite * sprite3
, so as to only have one child of the CCLayer
it would be added too? Instead of simply adding sprite2
as child of sprite1
and then adding sprite1
to the CCLayer
. I am trying to keep children of the layer to a minimum for performance.
Asked
Active
Viewed 76 times
0

stenger96
- 224
- 3
- 17
-
1looks to me like you are worrying about being worried ! did you measure any 'performance' related issue ? – YvesLeBorg Mar 04 '14 at 01:10
-
Yes on iPhone 5 I have 60 fps while on 3G it drops to 30 – stenger96 Mar 04 '14 at 01:45
-
wait, you're still developing for 3G? Let that go.... – CodeSmile Mar 04 '14 at 08:53
-
also number of sprites isn't the problem when they are properly batch drawn – CodeSmile Mar 04 '14 at 08:54
-
should I develop for iPhone 4? – stenger96 Mar 04 '14 at 10:30
-
The "sprites" I am working with are CCTMXLayers which are largely transparent. I feel it would be more efficient if I could somehow draw them as a single image rather than 50+ large, mostly transparent images. – stenger96 Mar 04 '14 at 10:44
-
I believe you're trying to solve a problem that doesn't exist. – Reza Shirazian Mar 05 '14 at 19:55
-
Problem or no problem, my question is if it is possible to layer two sprites to create one. – stenger96 Mar 05 '14 at 21:21