cocos2d , openGL ES or Quartz2D

plesae excuse me if this is a trivial question but i havent found any good answer so far.

i have started learning game programing with intention to write 2D games (for start) for the Iphone. i almost completed one general iphone programming book and i want to start learning how to work with an animation library

i am having problems to decide among the 3 options above. this is the impression i got from doing some reading.

openGL - is flexible powerful and cross platform but very low level and takes long to learn

Quartz2D - is simpler but less flexible and not cross platform

cocos2d - well all i know its easy to use and i can port it to android easily.

What would you suggest ?
maybe i should start with one and slowly move to another ?

OpenGL is low level, but it's not that hard to learn really. It's very flexible and can be extremely fast.

Quartz2D is too slow to use for games as it's all software rendered. IMO it is also harder to draw sprites in than OpenGL anyway. It draws nice anti-aliased vector stuff well, other than that, don't use it.

Cocos2D has decent performance, and an easy learning curve. It's fine if you just want to draw sprites, but makes it hard to draw fancy stuff as you have to understand both OpenGL and how Cocos2D uses it. Porting to Android is only possible if you use Cocos2D-x (or whatever it's called) and write your game in C++. Probably the best thing about it is that it makes it very easy to go from having an image file to a sprite moving around on the screen.

A ton of people use Cocos2D, but I don't like it personally. I prefer the flexibility of OpenGL and just write a renderer that does what I need. If you don't go feature crazy, you don't need to write a lot of OpenGL code. The renderer for Twilight Golf (http://howlingmoonsoftware.com/twilightGolf.php ) is ~500 lines of OpenGL code including the lighting/shadowing. If I took out everything except the texture loading/sprite drawing code it would be about 200.

It depends on what you want to do with your game. If you just want easy simple sprites, Cocos2D is for you. If you want fancy effects, you might find yourself fighting it instead.

im starting to get the feeling that openGL ES is worth the effort. i still have 2 doubts.

in 2D animation most of the times you are moving sprites around. this is quite simple to do in cocos2D. is it also simple in openGL? i find it hard to believe since openGL is based on drawing primitives.

And also, cocos2D handles many stuff besides graphic, stuff like touches and other user interaction. isn't that something worth using.

Sure, it's easy in OpenGL too. A sprite is just 4 vertexes and a pair of triangles from them. Here is some sprite rendering code I ripped out of one of my projects quick. I didn't take the time to comment it super well, but you should get the idea that it's not terribly hard to do.

// Draw them all in one pass.
glDrawArrays(GL_TRIANGLES, 0, 6*MIN(maxQuads, count));
}

As for Cocos2D's input handling. It's exactly like the normal iOS stuff, it basically just forwards the method calls to the Cocos2D objects. In fact, because it does this, it makes it harder to do advanced input processing because you can't easily use Apple's gesture recognizer APIs. Though games mostly don't need that sort of input.