I have been experimenting a lot lately with different technologies for drawing 2D-sprites on iOS (CoreAnimation, UIViews, CGContext and Open GL ES). The best performance versus developmenttime I got from CoreAnimation so I will stick to that (for the time being).
To display bitmaps I use CALayers - which works just fine and not much slower than Open GL. There are multiple patterns which repeat often (which is typical for a platforming game). For memorysaving reasons I would like to reuse a stored Image for multiple CALayers.
Can I do that? How? I imagine something like:
Will this actually store only the pointer to the bitmap for each Layer or does "Apple-magic" create a copy of the bitmap for each CALayer?
Thank you.
After creating an iOS project to test this, here is my conclusion:
I found no way of displaying a tile multiple times without using RAM for each tilebitmap working with CALayer. You have to work with OpenGL ES to do that.