Download

Stable version

Download: cocos2d-iphone-1.0.1.tar.gz

 

Unstable version

Download 1.1 branchcocos2d-iphone-1.1-beta2.tar.gz

Download 2.0 branchcocos2d-iphone-2.0-rc1.tar.gz

 

Bleeding edge version

Use this command to anonymously check out the latest project source code:

$ git clone git://github.com/cocos2d/cocos2d-iphone.git
$ cd cocos2d-iphone
// For the v1.x branch
$ git checkout develop
// Or for the 2.x branch you should do
$ git checkout gles20

Download older versions

43 Responses to “Download”


  • i downloaded the new version on my mac and i cant open it, what do i do?

  • I downloaded Cocos2d but I can’t launch it, what file do I activate to use it?

    Do I need the latest version of Xcode?

    Do I need the iPhone SDK first?

  • Yes, you need the SDK: http://developer.apple.com/iphone
    Please, use the forum, to ask these kind of questions: http://www.cocos2d-iphone.org/forum

  • Why does the template installer never work? I get 100 errors and an empty folder where the templates should of. I had to drag them into the template folder manually and, lucky me, the cocos2d source is missing in them anyway.

  • I’d like to take a shot at programming in this language but it seems with very understandable reason it’s only meant to be worked on through a Mac. Will there ever be a version that can be run under Windows?

  • the READ ME link is broken

  • @airic081: thanks. fixed.

  • How to set Portrait mode in template with Box2d in last v0.99.5 beta3. Im trying to do this, but gravity force in left in Portrait mode.

  • Using install-templates.sh from a directory other than where it’s stored breaks the script; i.e., when dragging into a raw terminal window (defaulting to ~/), it expects all of the data in the tar.gz to have been extracted into your current working directory. Changing directories to where you extracted the tar.gz and running the script (and then forcing it to “reinstall” when it asks) will work correctly.

  • Hey Riq,

    couple of notes (discovered when taking the CCTexture2D class out to use with another little project I am working on):

    1.) lots of class i-vars shadowing (nothing aweful, but it generates tons of warnings)… it can be avoided in various ways, but the cleanest is to simply change the properties like so (maybe i_ is not the best… and you have to change the @synthesize directive in the .m file too):

    /** pixel format of the texture */
    @property(nonatomic,readonly) CCTexture2DPixelFormat i_pixelFormat;
    /** width in pixels */
    @property(nonatomic,readonly) NSUInteger i_pixelsWide;
    /** hight in pixels */
    @property(nonatomic,readonly) NSUInteger i_pixelsHigh;

    /** texture name */
    @property(nonatomic,readonly) GLuint i_name;

    there will be error this way, but few of them and easy to spot and fix without the fear of adding bugs IMHO.

    2.) rotating the texture is quite trivial so maybe passing a boolean flag (defaulted to NO for sake of compatibility) to rotate the CGcontext would be helpful:

    (CCTexture2D:286):

    //place an if or an #if around this
    // Flip the Y-axis
    CGContextTranslateCTM (context, 0, CGImageGetHeight(CGImage));
    CGContextScaleCTM (context, 1.0, -1.0);
    //
    CGContextClearRect(context, CGRectMake(0, 0, POTWide, POTHigh));
    CGContextTranslateCTM(context, 0, POTHigh – imageSize.height);
    CGContextDrawImage(context, CGRectMake(0, 0, CGImageGetWidth(CGImage), CGImageGetHeight(CGImage)), CGImage);

    Still, amazing piece of software :) . I am glad there isa pure Objective-C implementation of this, but I also glad that there are native versions for other platforms :) … rather than just a single C++ version… I am glad that between CCTexture2D and a wrapper to Oolong’s Matrix class I got my codebase to speak Objective-C again [%10 of Objective-C++ that does not propagate further though ;) ])
    // Repack the pixel data into the right format

  • @DM: thank you :) the installation now works fine.
    Cheers.

  • Thanks for the latest release :)

    To everyone having trouble, please search for your problem on the forum first, you wont be the first person to not know how to do it. :) Then go through Ray Wenderlich’s tuts, join the IRC and get involved. The forum is full of very helpful members with a huge amount of knowledge, so that’s the place to be.

  • Hi,

    I tried to install this version, after 99.4 was installed, and I’m not sure I succeded. Also I still see the documentation of 99.4 on the help

  • Hi everyone,
    I am trying to install the script in Xcode4! But no luck! Please help me out! It does not work.Anyone has an idea how to change the script to make it work in Xcode4?

    Thx!

  • Hi All,

    I have create game using this API.

    But Apple has reject as giving the reason that I have use non public method in my application , and the method is the “terminate”. after debugging the Application I found the call to this method in many classes and the call is given as below.

    if( [[UIApplication sharedApplication] respondsToSelector:@selector(terminate)] )
    [[UIApplication sharedApplication] performSelector:@selector(terminate)];

    SO as the terminate method is private of UIApplication Apple has reject my application.

    I kindly request to developer of the cocos2d ,Please remove this method and try to find any other alternate to terminate the application like ” exit(0); ”
    or anything else which is better.

    Thanks For this helpful API.

  • @kunal: “terminate” was removed from cocos2d more than 1 year ago.

  • Will the new version release for the xcode4 templates soon? Thanks.

  • @Levent: That’s the idea. It is being discussed in this thread: http://www.cocos2d-iphone.org/forum/topic/13782

  • Any mirrors? I’m in China and google code won’t download reliably.

  • I get tons of errors when I run the installer.

    my-macbook:~ paulw$ sudo /Users/me/Downloads/cocos2d-iphone-0.99.5/install-templates.sh -f
    Password:
    cocos2d-iphone template installer

    Installing cocos2d iOS template
    —————————————————-

    removing old libraries: /Library/Application Support/Developer/Shared/Xcode/Project Templates/cocos2d 0.99.5/cocos2d Application/
    …creating destination directory: /Library/Application Support/Developer/Shared/Xcode/Project Templates/cocos2d 0.99.5/cocos2d Application/
    …copying template files
    rsync: link_stat “/Users/me/templates/cocos2d_app/.” failed: No such file or directory (2)
    rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-40/rsync/main.c(992) [sender=2.6.9]
    …copying cocos2d files
    rsync: link_stat “/Users/me/cocos2d” failed: No such file or directory (2)

  • @Paul:
    Change to the cocos2d directory first, and then run the installer
    $ cd cocos2d
    $ ./install-templates -u -f

  • When would the cocos2d 1.0.0 be officially released?

    Thanks.

  • @Geno:
    Pretty soon. Probably in 2 weeks.

  • when i run my application in debug mode useing 0.99.5 template i am getting plenty of errors (around 34,000)
    y so ???
    by the way i use gcc 4.2 compiler

  • hi , what is Stable version Or UNStable version ?? what diffrent ?

  • Jeffrey Mak from Hong Kong

    For all that have problem in installing the template, my experience is that the “stable release” does not works.
    I finally decided to checkout the development version through git and then run the install template. Xcode shows up the cocos2d project template now.

    The “stable release” spends me a few hours…. suggest to put remarks the “installation + template” guide.

    Feel happy to contribute to the project for all the good works in cocos2d.

  • If the templates or template installer have been updated since mid-June, kindly disregard these remarks. Otherwise let me relate my experience because I think it could be very helpful to some.

    I was unable to get the regular cocos2d template for Xcode 4 to work. In fact, it installed itself in a separate section called “Templates” instead of the cocos2d section where I think it was intended to belong.

    However (and this is the potentially good news), the chipmunk and box2d templates seemed to work perfectly. I was able to patch the results of the regular template to work. (It wasn’t hard — mainly just transplanting the missing directories in the cocos2d section from a successful project install with the chipmunk or box2d template. However, for short experimental projects, I can just use the chipmunk or box2d template, even if I never intend to use chipmunk or box2d myself.

    I hope that is helpful. Cocos2d has been very handy for me in accomplishing in iPad animation what I used to do on the PC/XBox with C# and XNA.

    Bruce

  • It appears that some classes are missing from the tarball – like CCMoveTo…

  • Can I use cocos2d for Augmented Reality development?

  • Thanks for all your work. When using XCode 4.2 to build the Box2dTestBed Target, included with Cocos2d-ios-1.0.1 , and attempting to run in simulator of iOS 4.3, the Box2dTestBed can not launch, as the libc++abi.dylib is missing.

    Have you seen this?

    Full error is here:

    dyld: Library not loaded: /usr/lib/libc++abi.dylib
    Referenced from: /Users/crisrys/Library/Application Support/iPhone Simulator/4.3.2/Applications/6C262F03-169B-444F-BD47-C36956522D7C/Box2dTestBed.app/Box2dTestBed
    Reason: image not found

  • Just want to say thanks to everyone for all their hard work on this project!

  • When I XCODE 4. 2 versions installed above 0 99. 3 version, and then create a new cocos2d project when found, and give excuse it? Thank you

  • I’ve tried everything, including the beta version and re-installing the templates with an “-f” factor. I’ve watched YouTube videos and followed the instructions, but since I did it wrong, I give up. :(
    It’s a FAIL…I screw it up.
    I’m just a beginner of Xcode and Terminal.

  • My son and I are testing the waters and I’m helping him build a very simple side scroller.

    Which version of cocos2d should we be using?
    Since the branches and talks about support for retina display in the betas while the install document says to install 1.0, it’s unclear overall.

    Thanks in advance!

  • When I use Xcode it shows some issues saying ” ‘uniqueidentifier’ is depreciated ” for two files: CLScoreServerPost.m and CLStoreServerRequest.m. I hope nothing will go wrong.

  • @John: You can try v2.0-rc0 or v1.1-beta2

  • @TJ Rana:
    That warning is generated by cocosLive. You can safely remove the cocosLive component.

  • I’ve been trying to upgrade to the new cocos2D version, but I keep on getting issues (see http://www.cocos2d-iphone.org/forum/topic/30878).

  • I’ve downloaded and unpacked it. I got book from APress about cocoa2d programming where 0.99.3 version described. So I created first project and instead of HelloWorldScene I see HelloWorldLayer. Where I can find list of changes between these two versions. Thanks

  • We can install 1.0.1 and 2.0rc1 and they can both be part of Xcode templates? (that is, we can create 1.0.1 and 2.0rc1 projects on the same Mac with no conflict?)

  • @winterheat: yes, you can have both v1.x and 2.x templates installed at the same time.

Leave a Reply




Social Widgets powered by AB-WebLog.com.