Cocos2d for iPhone vs. Cocos2d-x [closed]
Asked Answered
L

7

36

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?

Legalize answered 18/6, 2011 at 22:41 Comment(5)
I think this link may be interesting to you, kinda a guide of cocos2d-x: #10711547Fierce
Since the 2.0 series, Cocos2d-X has become reliable enough to write professional-grade games. I've worked with both Cocos2d and Cocos2d-X. I can honestly say I may never go back to Cocos2d, now that I know what a great feeling it is to be able to compile for just about any platform.Blakely
Would consider these comments to be the closest thing to an answer here.Bride
Apportable looks like it might be a good option once they get all their kinks worked out, in which case cocos2d-iPhone all the way!Jihad
This is not my own opinion, but I live and work in Tokyo and what you hear is that if you code in Cocos2D-x, there is a great risk that "as Cocos2dX is very successful in China, there is a big risk that companies in China will copy and paste your code and launch shameless copies just like that". There is certainly some prejudice in that statement, but nonetheless there might be a risk in there. Oh and don't forget about Zynga. ;-) Still having said that, I have never personally used Cocos2d-x (only -iPhone/-Swift/-SpriteBuilder), but chances are I will try Cocos2d-x some time soon.Fireside
S
35

The lure of multi-platform builds are a nightmare in disguise. Any web designer will tell you horror stories of trying to juggle IE with Firefox with Chrome with whatever at the same time. You will not suddenly earn more sales because you were able to launch on Android/iOS/etc on day one. More than likely, your attempts to multi-platform will restrict your app in ways that will kill it on all platforms. Your best bet is to start with one platform, finish that, then build for others. Your end product will thank you.

There are no pros/cons to Cocos2d-x unless you like C++ more than Obj-C.

Sextuple answered 16/8, 2011 at 5:40 Comment(8)
Exactly what I would have said. If you've never done cross-platform development before, you shouldn't start considering it until you're already successful on your primary platform. Indie examples are wide-spread, ie World of Goo has only been ported after it was successful. Same with Angry Birds and many other indie games.Streptococcus
That doesn't mean you can't create an app in a way that would make it easier to port, should it be necessary / financially justifiable.Skyeskyhigh
If it's your first game, worry about a quality product first. If you're earning money from previously successful ventures, then you can worry about expanding your options. Otherwise, you're wasting your time and what (likely) little money you've got on hand.Sextuple
Where has the OP asked a philosophical question about whether cross-platform or single-platform-first methodologies are better?Grubb
This answer is outdated. Cocos2d-x has improved immensely. Also, whether or not to target multiple platforms at once really depends on the type of game that you're building. It also depends on the amount of effort / money you or your client wants to put it. This is not the best answer (anymore if ever).Prosperity
You are making a false conclusion based on (half)true premise. It makes sense to use engines like cocos2d-x even if you will release only for one platform (for a type of games these engines were designed for, of course). Part of your response is simply illogical: [[You will not earn more sales launching on two platforms]]. This is no an analyses - how is it accepted.Beep
My comment was never an attack on 2d-x itself. Only the idea of developing for multiple platform simultaneously before hitting an MVP product. Even Blizzard, which developed Hearthstone using the Unity engine, made sure it worked on the desktop first before moving onto the iPad version, and someday, Android.Sextuple
I can speak from experience that using Cocos2d-x to launch on Day-1 to Android, iOS and Windows Phone does significantly increase my revenue. And with Cocos2d-x 3.x the additional effort to develop and test for additional platforms is insignificant compared to the time spent creating the MVP of a game. Building and packaging for multiple platforms is quite easy if you know the handful of things required. I would have agreed with this answer in 2011, but in 2015 I think one should definitely consider trying out Cocos2d-x if you want to make a mobile game for iOS, Android and Windows Phone.Rubirubia
T
18

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.

Transmogrify answered 28/1, 2012 at 17:7 Comment(0)
S
9

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
Syphilis answered 13/6, 2013 at 5:31 Comment(0)
R
5

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++).

Rosaline answered 5/6, 2013 at 22:15 Comment(0)
P
3

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.

Philan answered 6/10, 2013 at 1:24 Comment(0)
S
2

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.

Sumer answered 7/10, 2013 at 10:14 Comment(1)
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!Rubirubia
D
0

I would stick with Cocos2D-iphone. Focus on the product from the bigger community with a lot more resources. When you are ready to port, then use apportable to compile your app for android when it's done.

Diestock answered 30/5, 2013 at 10:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.