diff between various frameworks for iOS game development? - ios

Struggling to distinguish between frameworks for iOS game development. Looking to draw a comparison amongst following frameworks i came across :
How to choose between frameworks or we can mix/match these together, what goes with what ?
Cocos2d
Quartz2D
OpenGL ES
sparrow
any other frameworks out there to consider ?
Which collision detection framework to use :
Box2D or chipmunk ?
is this a choice only with cocos2d ? what if i am using any of the other frameworks listed above , e.g openGL ES - can box2d be used with that or some other popular framework serves a better combination ?
edit #1
When we start a fresh cocos2d project following lines of code seems to be ref to openGl - does that mean we can mix and match the two or one is built on top of other... ?
EAGLView *glView = [EAGLView viewWithFrame:[window bounds]
pixelFormat:kEAGLColorFormatRGB565 // kEAGLColorFormatRGBA8
depthFormat:0 // GL_DEPTH_COMPONENT16_OES
];
// attach the openglView to the director
[director setOpenGLView:glView];

Ok,
Regarding physics engine of Box2d or chipmunk, i think both are great, each having its own benefits, it depends on you, using which engine you are more comfortable with?
Chipmunk is written in C, while Box2d is c++.
Box2D does support Continuous Collision Detection, but Chipmunk does not.
I personally use Box2d, may be i will be little biased, but i prefer Box2d. You can search more on cocos2d forum http://www.cocos2d-iphone.org/forum/.
Now regarding the frameworks, then what i know cocos2d and sparrow are the game engines while openGL ES and Quartz 2D are the graphics rendering API.
there is a post regarding the difference between a framework and the engine given below
What's the difference between an "engine" and a "framework"?
cocos2d uses openGL ES for drawing , difference between cocos2d and sparrow is well defined in the link given by bryanmac.
Using an engine is far more better to start than using an API and create your own framework. You will get many well defined functions already written in the engine which you have to code yourself if you use only rendering API.
I don't know much about sparrow but cocos2d is thoroughly developed, well documented, open source, Objective C language, so i will prefer cocos2d.

For what I have seen Cocos 2d is very powerful, you have full control of the scene, and it is still high-levelly as a framework. The learning curve is somehow steep, but it worth it. Of course you can integrate with Box2d http://www.raywenderlich.com/28602/intro-to-box2d-with-cocos2d-2-x-tutorial-bouncing-balls
Now, Sparrow for me is a speed framework, it is not as versatile as cocos-2d, but you can develop a game in a few days. In my experience, without knowing squat of sparrow, I took 15 days to develop a full simple game, where 60% of time I spent in designing the sprites and backgrounds. And yes you can use Box2d http://www.codeandweb.com/blog/2012/05/07/physicseditor-sparrow-box2d.
If you are starting, and your game is sprity, use sparrow, then little by little start moving to cocos-2d.

Related

Cocoa framework integrated with GLUT and OpenGL

I am new to MAC OS X programming. I am trying to develop an application that represents the rotation movement of the earth in 3D. What I want to do (probably I have mixed concepts, so sorry me) is to develop a Cocoa app where I will can visualize some controls in the window.xib that will allow me to change the rotation speed of the earth and things like that. The big issue that I have here, is that I don't know how to "connect" this controls with a 3D sphere and his functionality. I wrote a C++ program that uses GLUT libraries, that represents the sphere and the rotation movement, but I think I am going in the wrong way. Please somebody can clarify me how to integrate GLUT with a Cocoa application and the controls that Coca framework provides? If this is not possible I will appreciate any guide, tutorial or advice to continue with the development of my app.
Thank you so much and sorry for my poor english.
So your basic options for Open GL and OS X are Open GL or GLKit. GLKit is essentially an Objective-C wrapper around Open GL that integrates it into Cocoa.
My first suggestion however would be Unity 3D
Also you can look into Objective-C++ if you really want to go down that route, however I'd advise against it.

Easiest way to create simple 3d ios app

I'm looking to create a simple iOS app (for a geometry class) where you can tap and drag around 3d figures (cylinders, cubes, triangular prisms, etc.). What would be the easiest way to do this? Note I don't know any Objective-C.
It's kind of early but check out cocos 3d. Cocos 2d is a popular 2D game platform. Cocos 3D should insulate you from OpenGL ES.
http://brenwill.com/cocos3d/
Both cocos3d and cocos2d are built on top of the OpenGL ES frameworks
that runs on all iOS devices, and both are written in the native
Objective-C familiar to all iOS developers. With cocos3d, you can
effortlessly create a full 3D game or application without getting into
the nitty-gritty needs of the OpenGL ES state machine, and without
having to switch over to C or C++, as required by most other 3D
frameworks.
There's a mashup sample project to illustrate how to use it's APIs.
... the cocos3d distribution contains a Demos folder, where you
can build and run the CC3DemoMashUp app, a more sophisticated sample
of what’s possible with cocos3d
Here's the programming guide:
http://brenwill.com/2011/cocos3d-programming-guide/
If you download before april 8 2012 you get a free version of unity 3d ios version (android too if you are interested)

Unity for 2D games

Ignoring price for the moment, would using Unity for a 2D game be better than building one natively in iOS, i.e. faster and more powerful because of the underlying OpenGL usage, or is it either not supported well, complete overkill, not much better than just using UIImages and/or Quartz, or for some other reason worse?
Depends on the game. If you have under 100 or so sprites, you can just use UIViews without any big issue. Over that and you're starting to get in the realm where OpenGL will matter.
If I were doing a game with with lots of sprites or particles, I'd certainly look into Unity. Then again, I'd also look into Cocos2D. (I'm not directly familiar with either, my games are all UIView-based.)
Building any game using Unity instead of just UIKit/Quartz has the advantage that it will be easier to port it to other platforms if you want to.

Isometric tilemap platformer in cocos2d - player jumps?

I've read a lot about building isometric-tile-map based games for iOS using cocos2d (tutorials, examples, etc.). Unfortunately, can't find a proper example of making a classic platformer game with isometric tile map. The main thing is - how to make player able to jump, and how to build platforms that can be placed on different level above the ground. I know that this definitely can be achieved with cocos2d, the best example of what I have on my mind is game called "Alone" - http://www.itlgames.com/alone - there are videos and screenshots on the app website, that demonstrates player's ability to jump like in classic platformer game, but the world is presented using isometric tilemap. Author of that game claims that it was made with a help of cocos2d (source: http://www.cocos2d-iphone.org/games/game/alone-free/374215545). Anyone had seen good open-source example of jumping and platforms on isometric tilemap?
There is an cocos2d/box2d platformer kit available:
http://www.commander-cool.com/ios-2d-platformer-starter-kit.html
Maybe this helps?

Drawing custom shapes in an iOS game built upon cocos2d

I'm looking to draw a custom shape (say, a solid rectangle) using openGL ES in an iOS game built upon the Cocos2d framework. In another StackOverflow question, I saw a suggestion to use [CCDirector sharedDirector].openGLView; however, I am unsure as to how to go about this. Perhaps someone can provide an example or point me to some sample code?
Thanks in advance!
There are two tutorials I can recommend for doing this, depending on what exactly you are trying to achieve.
Generating Textures using CCRenderTexture - here
Generating Textures using OpenGL - here

Resources