cocos2d for iPhone - nice 2D game framework

Miscellaneous Forums/General Discussion/cocos2d for iPhone - nice 2D game framework

Just thought I'd make a quick post about the game programming framework – cocos2d for iPhone.

http://code.google.com/p/cocos2d-iphone/

It is based on the cocos2d design: it uses the same API, but instead of using Python it uses Objective-C.

Main features

Scene management (workflow)
Transitions between scenes
Sprites
Actions
Basic menus and buttons
Integrated Chipmunk 2D physics engine
Particle system
Text rendering support
Texture Atlas support
Tile Map support
Touch/Accelerometer support
Portrait and Landscape mode
Integrated Pause/Resume
OpenGL ES 1.1 based
Open Source LGPL

...it comes with numerous code samples and is quite nice to use.

There's a fairly lively mailing list, too:
http://groups.google.com/group/cocos2d-iphone-discuss

In the absence of Blitz, this is the next best thing.

That looks pretty cool! I'm not a fan of Objective-C tbh, but it will do until iBlitzMax arrives. Developing for the iPhone/iPod Touch in BlitzMax is *very* appealing...

On a related note, are iPhone - iPod Touch apps the same? Would you need to modify it for each one? I've been toying with the idea of getting an iPod Touch so I can develop games for them.

Is there any chance of iBlitz comming soon?... :-)

Thanks!

I'm also pondering getting an ipod touch for this reason ... I was going to get an mp3 player anyways because my current one is a bit out of date.

How exactly do you make applications for it? All I know is objective-c is involved.

I'd love to see Blitz for iPhone/iPod touch, I just don't think it will happen.

There is no difference between devices as far as your app is concerned, though you need to take into account features like a mic/speaker/vinration etc that the phone has and the iPod touch may not.

Obj-C, Cocoa, UIKit and then cocos2d-iphone is a steep learnign curve, but a fun one!

iPhones and first generation touches are slower than second gen touches.

You don't have to learn objective c if you just want to code an OpenGL app without any off the standard GUI stuff - you can use c/c++ almost exclusively. Just load up one of the OpenGL examples, change any .cpp or .m files to .mm (which means objective c and c++ mixed together), then just code away in c/c++.

2nd only to Max3D and the recently added Threads module, iPhone blitzmax is the next hottest thing in my opinion.

I've noticed that my iPod Touch is much faster than my 3G iPhone. I don't have a first generation iPod Touch or iPhone so if they're slower than the 3G that's not good. As far as tools go I'm working with Unity and don't see much use for anything else really.

I had a look at Cocos previously -- it's LGPL (somewhat nonsensically as you can't dynamically link to it) and, while the author is happy to waive any obligation for you to send him your source...

Can I use cocos2d for iPhone in my closed-source iPhone application ?

Yes, you can.

Don't worry about violating the LGPL license.

Since iPhone doesn't support shared libraries for external applications I'm OK if you use cocos2d for iPhone as an static library or if you include all the sources as part of your application.


...I'm not sure how that protects you against customers/competitors asking for your source. I mean, 'Don't worry about violating the LGPL license'?! If it's not LGPL then don't release it under LGPL!

I'm happy to be corrected that this really isn't a concern but LGPL stuff makes me nervous, frankly. (EDIT: Oh and as a commercial developer you should absolutely worry about violating software licenses... that should be a given.)

"but it will do until iBlitzMax arrives"

huh???? Tell me more please!

It's good enough for me, I am using it now to make a game.

Any idea when we might see or find out about iBlitzMax?

Paul

huh???? Tell me more please!


iMiniB3D, not iBlitzmax:

http://www.blitzbasic.com/Community/posts.php?topic=81796

Quite a difference if you compare this to how max3D is done, the developer even gives brief information about what has been changed.

-> http://code.google.com/p/cocos2d-iphone/updates/list

msephton - are you porting Wire Hang? I would have thought that would be a perfect fit for the iPhone.