cocos2d v2.1-beta3 released!


I am happy to announce that cocos2d-iphone v2.1-beta3 is available for download:

Highlights

  • Many JS improvements:
    • compatible with cocos2d-html5, improved JS API
    • compatible with Chipmunk-JS (beta)
    • New JS tests/examples: CocosDragon, and reusing all the JS tests from cocos2d-html5
  • New ClippingNode
  • Added Gesture support for OS X
  • Much better integration with CocosBuilder
  • “Auto draw” support in RenderTexture (beta)
  • Updated 3rd party components (Chipmunk, uthash, SpiderMonkey, jsbindings, CocosBuilder Reader)
  • Many bug fixes in different components

Full Changelog: CHANGELOG

Many thanks to all the contributors!!

Understanding JS:

  • cocos2d v2.1 comes with JavaScript as scripting language: JS is fast and has a small footprint.
  • This is an optional component. So, you are not required to use it.
  • You can create your whole game in JS; or use JS only for basic things and develop the hard-core in Objective-C; or don’t use it at all.
  • Should you decide to develop your whole game in JS, you will be able to run it WITHOUT ANY CHANGES in any browser (by using cocos2d-html5) and on Android (by using cocos2d-x)

More info about cocos2d and JS: cocos2d-and-JavaScript

JS Examples:
CocosDragon: 50% developed using CocosBuilder, 50% developed in JS

JS Tests: Do you remember the cocos2d Objective-C tests ? Well, now they are in JS too.
Try the web version: –> JS Tests Web <–

Moon Warriors: Developed 100% in JS.
Try the web version: –> Moon Warriors Web <–

Watermelon With Me: A Physics game developed 90% in JS and 10% with CocosBuilder

14 Responses to “cocos2d v2.1-beta3 released!”


  • I am trying to install the templates but I have permission denied when it tries to:
    mkdir: /Users/username/Library/Developer/Xcode/Templates/File Templates/cocos2d v2.x/: Permission denied
    mv: rename /Users/username/Library/Developer/Xcode/Templates/cocos2d v2.x//CCNode class.xctemplate to /Users/username/Library/Developer/Xcode/Templates/File Templates/cocos2d v2.x/: Permission denied.

    I tried already to change permissions via terminal to that particular folder, but no luck. can anyone help!!!

  • @Pianisimo:

    Try this:
    `
    $ sudo rm -rf ~/Library/Developer/Xcode/Templates/cocos2d\ v2.x/
    `

    And then try to install the templates again.

  • Thanks riq I got it to install fine, nice work guys :) , was waiting for this for so long. Cheers.

  • Hi – I have downloaded this version. I am unable to install xcode templates even after running $ sudo rm -rf ~/Library/Developer/Xcode/Templates/cocos2d\ v2.x

    I am getting the following error even though I am a root user. Any ideas ?

    Installing cocos2d templates
    —————————————————-

    …creating destination directory: /Users/Dirac/Library/Developer/Xcode/Templates/cocos2d v2.x/
    mkdir: /Users/Dirac/Library/Developer/Xcode/Templates/cocos2d v2.x: Permission denied
    mkdir: /Users/Dirac/Library/Developer/Xcode/Templates/cocos2d v2.x: Permission denied
    …copying cocos2d files

  • @Carl:
    Make sure that you have permissions in the “/Users/Dirac/Library/Developer/Xcode/Templates” directory.

    Try the following:
    `
    $ sudo chown -R Dirac /Users/Dirac/Library/Developer/Xcode/Templates/
    `

  • @riq

    Thanks a lot. I was able to install the templates after I ran the command suggested by you.

  • Riq,

    Does it support iPhone5? I have not found any special name convention for iPhone5 in CCFileUtils

  • @dmitry:
    v2.1-beta4 supports iphone5 (to be released next week).

  • The orientation only works on ios 6. I just upgrade to this latest version of cocos2d for my new game with landscape mode last week. The orientation works on ios 6, but not for ios 5.1, ios 5.0, or ios 4.3, when I rotated the device, the screen shows only part of it. Here is the screen shot.

    IOS 6 screen shots:
    http://www.abitalk.com/ios6.png
    http://www.abitalk.com/ios6-vert.png

    Non ios 6 screen shots:
    http://www.abitalk.com/ios5.png
    http://www.abitalk.com/ios5-vert.png

    The code below works on the earlier cocos2d-iphone but not working on this release.

    Here is my code in appdelegate inside didFinishLaunchingWithOptions
    NSString *reqSysVer = @”6.0″;
    NSString *currSysVer = [[UIDevice currentDevice] systemVersion];

    if ([currSysVer compare:reqSysVer options:NSNumericSearch] !=NSOrderedAscending)
    {
    [window_ setRootViewController:navController_];
    }
    else
    {
    [window_ addSubview: navController_.view];
    }

    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
    {
    if(g.ios6) {
    return UIInterfaceOrientationMaskLandscape;
    } else {
    return UIInterfaceOrientationIsLandscape(interfaceOrientation);

    }
    }

  • @Emmy:
    Use the code generated by the templates. With it, autorotation will work on iOS 4.x, 5.x and 6.x

  • @riq.

    Thank you so much. The rotations works on all the ios version now. You are the best!!

  • I’ve updated to 2.1 and using iPhone everything works great. On the iPad however I am having problems. I resize CCGL view to keep it at the 2/3 ratio of the iPhone. The window resizes it though when called makeKeyAndVisible. This same method worked with cocos2d1. Is there a way to do this using 2.1?

  • @Bird:
    Are you using the templates bundled in cocos2d v2.1-beta3 ? They should take care of resizing

  • @riq
    I did not start with the template and add files to it. But i did reference the template to ensure that the didFinishLaunching method as well as the Navigation Controller and CCDirector delegate were setup properly.

    Instead of setting the bounds of the CCGLView to that of the window I set them to the modified bounds. However I notice that when I call makeKeyAndVisible on the window, the CCDirector winSize is changed to full screen as well as the size of the CCGLView.

Leave a Reply




Social Widgets powered by AB-WebLog.com.