I am happy to announce that v2.0.0-alpha is available for download.
Download: cocos2d-iphone-2.0-alpha.tar.gz
Highlights:
- OpenGL ES 2.0 support (shaders)
- Better physics integration
- Includes Box2d v2.2.1 & Chipmunk 6.0.1: Templates updated with new best practices
- Much faster Motion Streak
- Improved ProgressTimer
- Much easier to create “Double Resolution” sprites in Retina Display
- Retina Display code rewritten: double viewport instead of position. Everything is in points.
- Improved profiling API
- Simplified Sprite / SpriteBatch source code
- and more
API reference: http://www.cocos2d-iphone.org/api-ref/2.0.0
Release Notes: http://www.cocos2d-iphone.org/wiki/doku.php/release_notes:2_0_0
How to migrate to v2.0: http://www.cocos2d-iphone.org/wiki/doku.php/prog_guide:migrate_to_v2.0
Documentation is still very incomplete. When in doubt, please read the tests’ source code.
This is not an stable release.
I would appreciate if you could test it in your game and report any possible bug that might appear.
Thank you.







this is very exciting. played around with pre-release after seeing one of Ray’s tuts. thank you for all the hard work.
I seem to be having issues with the kazmath, it says that the files are not found for any file within the kazmath directory. Whats the best way to solve this?
@jay: what kind of error ? Did you install it using the templates ?
How could we install this latest version with the ole one? I don’t want to remove old version as i’ve some games built on that.
@jay: Did you run into a lexical or preprocessor issue? I resolved the issue by going to my target -> Build Settings -> User Header Search Paths and checking off the recursive checkbox for the /libs path.
@mahmud:
For the moment you have to re install the templates.
I will fix it for the next version.
Awesome!! Thanks a lot Ricardo, will try on my games.
@riq, I found the issue. Its actually something that was fixed previously but I’ll give time as this is only the alpha version. But when using a space in the Project name the kazmath will give errors of files not being found. But it’s no major worry, I thought it was in general and after I submitted my post I tried making a project without a space in it and it worked. I guess its just a basic ID10T error.
But the transition to OpenGL 2 is definitely a help. Thanks for the great update and I definitely can’t wait until the full is released. Great work!
@jay:
Try to use llvm as compiler, and not llvm-gcc
http://www.cocos2d-iphone.org/wiki/doku.php/prog_guide:migrate_to_v2.0
Awesome stuff. I thought I read somewhere you got hired by some firm, so I expected development on cc2d to slow down, love to be proven wrong
I’v found some strange behavior when trying to do z-sorting inside custom ‘draw’ method.
When I using kmGLTranslatef(0.0, 0.0, -100.0), the object #2 moves on x and y %)
- (void)draw {
[super draw];
/// drawing the ground using native opengl functions
ccGLEnableVertexAttribs(kCCVertexAttribFlag_Position | kCCVertexAttribFlag_TexCoords);
ccGLBlendFunc(myBlendFunc.src, myBlendFunc.dst);
ccGLUseProgram(myShader->program_);
kmGLPushMatrix();
// object #1
kmGLTranslatef(layer.position.x * CC_CONTENT_SCALE_FACTOR(), 0.0, 0.0);
ccGLUniformModelViewProjectionMatrix(myShader);
ccGLBindTexture2D(dirtTex.name);
glVertexAttribPointer(kCCVertexAttrib_Position, 2, GL_FLOAT, GL_FALSE, 0, groundData.vertsDirt);
glVertexAttribPointer(kCCVertexAttrib_TexCoords, 2, GL_FLOAT, GL_FALSE, 0, groundData.textsDirt);
glDrawArrays(GL_TRIANGLES, 0, 6*groundLen);
// object #2
kmGLTranslatef(0.0, 0.0, -100.0);
ccGLUniformModelViewProjectionMatrix(myShader);
ccGLBindTexture2D(grassTex.name);
glVertexAttribPointer(kCCVertexAttrib_Position, 2, GL_FLOAT, GL_FALSE, 0, groundData.vertsGrass);
glVertexAttribPointer(kCCVertexAttrib_TexCoords, 2, GL_FLOAT, GL_FALSE, 0, groundData.textsGrass);
glDrawArrays(GL_TRIANGLES, 0, 6*groundLen);
kmGLPopMatrix();
}
THANKS for this! I have updated my shooter project to this new cocos2d version and I can confirm that this:
“Much faster Motion Streak”
… is simply true.
Very good work.
@riq
Thanks for all your hard work!!
Will this new major version (cocos2d v2) include all the new additions added to 1.1, like the CCParticleBatchNode ?
@calin Yes, it will.
Sad, I still want to position sprites by pixel.
I don’t feel like programming my game 3 times for Phone Pad and Mac.
I’m trying to fix my issues by tearing out the retina support from the ccMacros.h. Gosh I hope I don’t break too much.
I downloaded the new version of cocos2d and ran the installscript then downloaded the latest version of cocos3d and ran the install script. It copied over the cocos2d libs etc.. but when I open a demo project for cocos3d and look inside the cocos2d folder, loads of files seem to be missing, i.e no json libraries, no CCTransitionradial.h etc… and if I try to build that kazmath error pops up. Am doing the setup correctly ? I redid it over 5 times making sure I am following the steps correctly but it seems like a few files seem to be missing.
Oh and I also had the previous version cocos2d installed but I overwrote the setup with the new cocos2d stuff.
Okay my bad. It looks like it doesn’t support the beta version
hi I’m getting the same kazmath error. i deleted the old cocos2d folder and added in the new one.
i deleted-removed reference only for old cocos2d folder and readded it to project.
i clicked recursive on libs folder and I’m using lvvm3.1
i did notice that inside the downloaded folder, there is the cocos2d but there is an external folder with a kazmat folder in it. thats not inside my project. is it supposed to? it doesn’t say so in the migration page.
Find the”kazmath” folder in the “external” folder in the download files and add “kazmath/src” to your project. Because all of the include statements that cocos2d uses include a reference to the kazmath folder (e.g. include “kazmath/kazmath.h”, you’ll now need to go to the build settings for your target and add a header search path to the “kazmath/include” folder from the cocos2d download files.