Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mymac1

macrumors newbie
Original poster
Hi All,
I have been reading through many posts on the internet and it seems that OpenGL is widely recommended API to be used for 2D games on the iphone as well as 3D.

I am looking to develop a 2D game which has more than two background layers and several sprites.
The technique I have used so far is to create a textured quad for each of the layers and sprites, rendering them in the sequence in which they appear (last drawn item on top).

Regarding the texturing of the quads, I'm using a texture atlas and specifying texture coordinates in floating point for each of the background layers and indvividual sprites.

Is this the best way to render layers and sprites? it seems kind of like a sort of makeshift way of doing things. Plus when animating the different sprite frames I have to change all four texture coordinates each time based on stored coords for each frame image.

your thoughts?

Thanks in advance
M!
 
That sounds about right; that's the way I built my game.

You should also look into cocos2d, a framework for making 2d games without learning OpenGL. There's also the texture2d class files from Apple that wraps some simple openGL drawing.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.