Core Animation or OpenGL for a simple game for iPhone

I am writing a simple game that quickly animates an image of a ball through a background image.

Will Core Animation / Quartz be sufficient for this scenario?

I do not want to study OpenGL ES if it will not provide significant benefits in this project.

+7
iphone cocoa
source share
7 answers

This is a frequently asked question. Other questions, such as:

  • Board Game for iPhone: OpenGL ES or CoreGraphics?
  • Most iPhone games made using OpenGL ES?
  • Core Animation or OpenGL ES?
  • Does openGL ES have better performance than Core Animation and UIKit when it comes to highly animated user interfaces?
+5
source share

OpenGL ES I believe this is not too complicated.

But in the end, Core Animation will be fine, its super powerful and not hard to work. It will also help you release the game sucks quickly and quickly, and you want to change it, and you didn't even need to learn OpenGL.

I highly recommend looking at cocos2d. Very simple game engine for 2d. http://cocos2d.org/

Look at this.

Cheers, John

+3
source share

OpenGL ES is not that difficult, there are many really good resources on the Internet and walkthroughs. It can be difficult at first, but once you realize that everything will be easy. 71 Squared has very detailed manuals:

http://www.71squared.co.uk/iphone-tutorials/

About the question, Core Animation is great for most applications, but in video games. Fundamental is the effective use of your game and control over it.

Cocos2d Excellent and I recommend it. If you need to write a good game, but if you do it for educational purposes, I recommend OpenGL, you will learn a lot with this and gain a lot of experience.

+3
source share

Just go to something like Cocos2D so that OpenGL is made for you. OpenGL ES is significantly faster and more convenient than Quartz, and it's not complicated. I even think that Quartz is a big pain in the butt, and itโ€™s hard to understand, although I came from the OpenGL background on desktop computers at first, so itโ€™s natural that the jump is pretty small. The fact is that with either Quartz or OpenGL ES you will need to spend a lot of time managing resources, etc., so that you can also go with Cocos2D.

+1
source share

yes, it will be good if you do not want to make hundreds of balls at once or something else complicated.

0
source share

If your knowledge of Core Animation is good, I recommend that you skip the OpenGL ES tutorial now, as it really won't help you (if all you want is what you described, of course). On the other hand, if you plan to create more games with more attractive graphics, itโ€™s best to start learning the API. OpenGL ES is a simple API and you can use the full graphical capabilities of the iPhone with it.

If all you want to do is just make this game, then I will say that you know that you know and are productive.

0
source share

I would say that it very much depends on what you want to do with the ball. If you just want to turn off the animation and forget about it, then Core Animation will probably be fine. However, if you are trying to interact with the ball, for example, changing the direction of the ball in the middle of the flight based on user interaction, you probably want to consider OpenGL ES. Of course, you have another option - do not use either Core Animation or OpenGL ES, but simply redraw your presentation on a timer.

If you are a competent C programmer, I wouldnโ€™t put off OpenGL ES too much. Apple provides many options for hosting OpenGL ES views in its templates. Although OpenGL can be quite attractive, if you are not trying to display huge 3D scenes with multiple objects, the basics are pretty simple, and you can easily get some nice results. Although this is for OpenGL, not OpenGL ES, I would recommend this set of video demos as a good starting point:

www.videotutorialsrock.com

0
source share

All Articles