- Home /
Displaying background layers effectively on iPhone
Hey guys,
I'm currently trying to optimize my game for the iPhone. I'm working with the iPhone 4 at the moment. I use Sprite Manager and Unitile as middleware to design the different levels.
I am working with a parralax effect, which is using 4 layers. 2 backgrounds, 1 foreground and 1 layer as the playing field. Currently I have cut the background in smaller chunks, so I am able to create a repeating background, and am using the Sprite Manager to create those textures.
Now my question would be: What is the best way (for iPhone) to display backgrounds? The background is not transparent, the 2nd background, which is layered on top has multiple holes/transparencies, and the foreground has transparencies as well. Is there a shader which works exceptionally well, for any of those textures? Or is there even a better way to display those layers? Maybe creating planes, instead of using Sprite Manager.
I tried to experiment a lot with different shaders and techniques, but the performance loss is still very noticeable, and I really have problems to get the game running at smooth 60 fps, although its entirely 2D and doesnt even have much going on at a time.
I really appreciate advice on this matter.
Thank you guys.
I'd be interested in some best practices here as well as I'm working on a similar project.