Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Say Hello to Cocos2D-Swift (cocos2d-iphone.org)
84 points by collinjackson on June 4, 2014 | hide | past | favorite | 11 comments



I've used cocos2d for my iOS app, Kodable, for two years now. It has worked great...for the most part. If I didn't need to support iOS 5 and 6 for schools, I would have already switched to SpriteKit.

The biggest problem with cocos2d now is that SpriteKit is slowly making it irrelevant, at least for iOS-exclusive apps. Apple basically ripped it off and remade it and packaged it with iOS. It even has the same mode/scene structure! Cocos2d has almost nothing that SpriteKit doesn't except for being open source and a few extensions.

Why would I use cocos2d with swift when SpriteKit has such close integration with it already? There's still a place for cocos2d, but with cocos2d-X, the C++ cross-platform version.


SpriteKit is ok but it lacks a lot of feature found in Cocos2d. SpriteKit is also closed so if you find a bug, you have to wait a year and hope for an update. Cocos2d users are free to fork and optimize as they want. You have full control. You can even do 3D and custom shaders and full GL with it which is not possible with SpriteKit.

Don't get me wrong. SpriteKit is great place to get started, but when you need something more powerful, that is where Cocos2D comes in.


Of course as the sibling posts mentioned, open source is a huge plus. I've learned a huge amount of OpenGL looking at the Cocos2d-x code and making custom nodes. But I think Cocos2d is kind of pointless, unless it has killer features that Cocos2d-x doesn't offer (I don't know how much they've diverged) or you really, really hate C++. But giving up the whole Android market because of language preferences is a huge deal in my opinion.


Cocos2d lets you use shaders in your 2D games. You can also access the full power of OpenGL if you need it.


Let's say that "http://www.cocos2d-swift.org/" isn't that complete with content..


Where is code example? All tutorials are written in objc.


You probably missed the part where it says they WILL be offering it, in the FUTURE. Currently it's just an annoucement.


I guess it's a perfect pairing. Performance is probably less important for Cocos2d type of games (rather then low difficulty barrier).


Swift performs better than Objective-C which Cocos2d was already using, so I assume you are either misinformed or trolling.


I'm assuming they are referring to this post: https://news.ycombinator.com/item?id=7849213

which suggests Swift isn't actually more performant than ObjC.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: