Cocos2d for iPhone vs. Cocos2d-x

26,419

Solution 1

I would agree that you should focus on developing for a single platform until you have a good solid product out there. However many a developer that does this after the fact realizes how much effort and additional cost is then needed to completely rewrite the game on a new platform. Would a little upfront thought you can minimize the need for rework and thus minimize your cost once you are ready to port your game. Android is too big of a market share to completely ignore it; in my mind Cocos2d-x is the way to go if you like Cocos2d.

Solution 2

I don't know about cocos2d-iphone but I do know about cocos2d-x.

Pros:

  • cocos2d-x uses C++ (well, not really a pro for some but this is a pro for me)
  • You can easily deploy to different platforms, assuming you've set it up correctly (see below)
  • It supports Lua and JavaScript, for an even easier coding

Cons:

  • cocos2d-x has little to no documentation. You would rely on the test projects and the API Reference. Thank god there are people like Nat Weiss who made learning easily available to users. (http://paralaxer.com/cocos2d-x-book/)
  • Setting up your project to work on every platform is a hassle. You'd have to be good at multiple IDEs as well as command line/terminal commands
  • Most of the scripts that come with the library to create new projects are not multi-platform, meaning, you still have to set it up individually for all platforms
  • Integrating third-party SDKs like Facebook, ads, and other stuff takes a lot of time since you'd have to implement them for every platform you are targetting

Solution 3

I am developing with cocos2d-x for iphone and it is working just fine for me. Only issue you may find is that the api is always slightly behind the cocos2d for iphone version. However api itself is reliable and a facsimile in most respects to the original.

If you're serious about porting to other platform even though you will try to succeed on a single platform first, cocos2d-x is the way to go, because you will not need to rewrite the gist of your code in some other language later (ie port from c++ to objc or from objc to c++).

Solution 4

I have worked with both Cocos2d and Cocos2d-X for iPhone development only (so far). I worked with Cocos2d for about 1.5 years and have moved on to Cocos2d-x in the last six months or so. At first, I was unwilling to move into Cocos2d-x because, in my opinion, it was still maturing. Coco2d 2.0 had come out with a lot of changes and I knew it was well deployed and tested. Coco2d-x seemed like it was still in flux. This has changed and I have decided to use Cocos2d-x for the duration, as long as it continues to be supported.

Both frameworks appear to work as advertised, in general, and give good performance for what I am working on (you can see some examples here).

I am comfortable with working in both the Object-C and C++ world. I don't know if I will ever port my "stuff" to Android, but it is nice to have the option.

However, the BIG deciding factor for me was reusability. I build lots of components and widgets that I reuse in other projects. If I developed for iOS only, Objective-C would be the way to go. But I work mostly in C++ and I don't want to have to recode all the ideas from one language to another every time I want to bring a tested tool out of the tool box.

I think this is going to ring true for any framework you choose to use for your development. If you have the choice, go with the option that will give you the best bang for your buck today, and down the road.

Solution 5

I am currently working on cocos2d-x and I am very happy with it. My advise would be to start the project on one Platform (I prefer IOS). And when you have successfully launched on one platform, start on another.

If your game becomes successful, at the end you have to launch on another platform too. So its best to plan ahead.

Share:
26,419
WiseOldDuck
Author by

WiseOldDuck

Quack

Updated on October 08, 2020

Comments

  • WiseOldDuck
    WiseOldDuck about 3 years

    I have worked some with Cocos2d for iPhone and find it delightful. I am starting another project, and have stumbled across Cocos2d-x, a C++ port. I'm tempted by the notion of being able to (with consideration) build for multiple platforms at once. I'm equally comfortable with Obj-C and C++, and am not looking for comparisons between the two languages unless it's specifically related to working with Cocos2d.

    Has anyone worked with both versions of the engine, and can you comment on specific pros and cons of the two? Is Cocos2d-x "finished"? Reliable?

  • Jim Range
    Jim Range about 8 years
    I agree that we should plan ahead and consider our strategy of if we want to target multiple platforms at some point. But I disagree that one should wait to test on other likely target platforms if they are serious about eventually publishing to them. The setup to target iOS, Android and Windows Phone is much much easier than I originally thought it would be. And an interesting point is that some games I have published are successful on Android, but not on iOS, or vise-versa. The more players you can get your game in front of the better!