Long time coder, first time game-developer.. I have the bare-bones of my game running on the iPhone. The only problem is.. I'm using CoreGraphics (simply because I was already familiar with it) but I'm worried as I add more sprites/effects performance will bog down. Should I bite the bullet and learn OpenGL? Is the performance gain worth it? It seems to have a steeper learning curve than CoreGraphics.. Would CoreAnimation be easier? AFAIK, that is hardware accelerated. FYI, the game requires a mostly static background & overlay, about 100 "sprite" blocks (actually static images, only a small number will move at a time) and about a dozen moving and animating character sprites. In the unlikely event there's any horsepower left, I'd like to add explosions/smoke etc. but I'm not counting on it!!
If you are just going for 2D, OpenGL isn't that hard to learn. We more or less only use OpenGL due to a) we know OpenGL already b) we don't like ObjC c) it's very fast and d) we have total freedom and can easily mix 2D and 3D whenever wherever we want. There are by far more books and tutorials about OpenGL too. In the long run, OpenGL is better since it works just the same on other platforms. With that said, it is more likely you will be struggling with OpenGL rather than creating your game, at least in the beginning.
Cheers for the replies! OpenGL it is. I guess my initial mistake was trying to "learn OpenGL", rather than just focusing on the 2D basics I needed to get the game done. Free codes for you guys*. (* in about a year, when I finally get it finished!)
Interesting, thanks. I don't think I can get around learning OpenGL (even cocos2d is OpenGL based), but that looks interesting. Having the in-built physics engine is handy too, even if my game's requirements are quite basic.
Not sure what objC and opengl have anything to do with each other in your comment above. For the record, objC really is awesome and way easier to use in gaming than c. For example, in my new game I just have a particle object that I just create a new instance of whenever I need an explosion and then just run an update on all instances within the object. Easy. My advice, use objC and opengl. Both are very easy to pick up....
CoreGraphics (and the other Apple APIs) require ObjC. OpenGL can be used in C/C++/ObjC. Choice of programming language is a matter of personal taste. I simply prefer C/C++ (mostly the latter).
doesnt open gl use polygons, vertices and textures? if i had someone doing 2d graphics and they were supplying me with .png files, would open gl be able to use them?
Polygons consist of triangles, which consist of vertices, yes, and they can be textured with images, i.e. textures. OpenGL renders stuff for you, it doesn't help you with loading images, you will have to do that yourself. If you can load a file and decode it, OpenGL can use it as a texture, whether it may be a PNG file, a JPEG file, a PVRTC file etc.
so for example if i have a picture of a person, i can specify vertices to wrap my image as a texture to fit it perfectly, and presumably set a colour that displays as transparent so its not just a coloured block with a picture person inside it?
Maybe consider Unity as well. It's dedicated to 3D, but has been used for 2D games too and is evolving fast.
Just had a look, thanks. Looks impressive, probably overkill for my first 'baby' project, but something I'd love to play around with. Looking at that page, I just remembered I previously bought GarageGames game engine for the Mac, and they do have a iTGB 2D game engine for the iPhone. But the indie license is $750. Bit steep.. Problem is, I don't really have the skillset yet to compare the game engines, or to compare Chipmunk to Box2D physics engines etc.. Pity TouchArcade doesn't do developer engine comparisons (hint..hint.. )
I'm working on 3D games, but I have a little 2D engine pet-project that I use to teach people how to program. If you would like to use it, I'd be happy to send it to you for free. It's nothing amazing, but it will definitely allow you to make the project you stated above^ (including the explosions ) As for 2D functionality, it includes a simple "draw2D" function that just takes in a texture ID (image), location and size. That should help get you started at least. Let me know if you would like to use it. Edit: It's all C++ based by the way. Are you experienced with C++?
This site I used to use has user reviews of a gazillion game engines. It's not iPhone-specific I'm afraid, but it does mention iPhone. The reviews look to be out of date, and these things change fast, but for what it's worth: http://www.devmaster.net/engines
Thanks all again for the suggestions! For a young platform, there's no shortage of options! I'm leaning towards cocos2D as it seems quite easy to get up and running, but I'd love to take a look at your project, if you'd like to pass it on! Yup, I'm familiar with C++. (And C, Obj-C, Object Pascal, J2ME, Actionscript, Applescript, VBScript, SQL, assembly... it seems I'm doing everything BUT games development, the one area I really want to get into! )
Well, I doubt that my project will compare against cocos2d in terms of completeness or anything, but in terms of simplicity I really doubt there's anything better As I mentioned, I created it specifically as a tool to introduce people to game programming. Anyway, here's the link: http://jshmrsn.com/sc/TwoD.zip Of course, all this talk of simplicity comes with the assumption that it compiles without a glitch XCode loves to give fits about random stuff some times. Let me know if this happens.
I don't know what you're talking about with regard to CoreGraphics. It is an entirely C API. It would have been nice if you looked at it before making a comment about the need to use Objective-C.