Cocos2D-X for iOS and Android: Getting Started

Discussion of the official tutorials published on raywenderlich.com. Please only discuss the official tutorials here - for general questions, use the General Discussion forum instead.

Cocos2D-X for iOS and Android: Getting Started

Postby rwenderlich » Tue Apr 24, 2012 11:00 am

This is the official thread to discuss the following blog post: Cocos2D-X for iOS and Android: Getting Started
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Ray Wenderlich
Blog: http://www.raywenderlich.com
Twitter: http://twitter.com/rwenderlich
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
User avatar
rwenderlich
Team Member
Site Admin
 
Posts: 2155
Joined: Thu Dec 23, 2010 4:14 pm
Has thanked: 28 times
Been thanked: 338 times

Re: Cocos2D-X for iOS and Android: Getting Started

Postby phynet » Tue Apr 24, 2012 5:21 pm

Woah! incredible! just what I need to start with Android and Cocos2D. Thank you very much Mr Jean!
Winter's coming
phynet
Hacker
 
Posts: 15
Joined: Tue Mar 22, 2011 5:29 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Cocos2D-X for iOS and Android: Getting Started

Postby zeiteisen » Tue Apr 24, 2012 6:17 pm

Oh I waited long for this tutorial. I cant wait to see the following. Kudos!
zeiteisen
Uber Haxx0r
 
Posts: 76
Joined: Mon May 02, 2011 8:41 pm
Has thanked: 5 times
Been thanked: 4 times

Re: Cocos2D-X for iOS and Android: Getting Started

Postby RabinL » Tue Apr 24, 2012 7:24 pm

Great Article, Can't wait to make my hands dirty :)
BallsBreaker
Image
RabinL
Uber Haxx0r
 
Posts: 82
Joined: Wed Dec 28, 2011 5:12 am
Location: Los Angeles, CA
Has thanked: 3 times
Been thanked: 0 time

Re: Cocos2D-X for iOS and Android: Getting Started

Postby shippo0708 » Tue Apr 24, 2012 8:24 pm

Will *most* Cocos2D tutorials from here work with 2D-X if we start with the 2D-X template?
User avatar
shippo0708
Uber Haxx0r
 
Posts: 682
Joined: Fri Apr 15, 2011 4:06 am
Location: Texas
Has thanked: 2 times
Been thanked: 51 times

Re: Cocos2D-X for iOS and Android: Getting Started

Postby jymen » Tue Apr 24, 2012 9:38 pm

shippo0708 wrote:Will *most* Cocos2D tutorials from here work with 2D-X if we start with the 2D-X template?

You'll need to convert from Objective C to C++ ... But C++ COCS2DX API is very similar to COCOS2D ; part 2 of this tutorial will provide a concrete example of such a port
jymen
Baby Hacker
 
Posts: 6
Joined: Mon Oct 31, 2011 5:23 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Cocos2D-X for iOS and Android: Getting Started

Postby d4devil » Wed Apr 25, 2012 7:15 am

Thank you soooooooo much JEAN for this great article. I am eagerly waiting for your next tutorial. :)
...
d4devil
n00b
 
Posts: 4
Joined: Wed Apr 20, 2011 7:46 am
Has thanked: 0 time
Been thanked: 0 time

Re: Cocos2D-X for iOS and Android: Getting Started

Postby asymptote » Wed Apr 25, 2012 12:55 pm

Thank you!!!!!!
asymptote
Baby Hacker
 
Posts: 9
Joined: Mon Oct 10, 2011 7:35 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Cocos2D-X for iOS and Android: Getting Started

Postby tehsuck » Wed Apr 25, 2012 2:23 pm

First off, this is a great write-up on cocos2d-x, thanks!

One gotcha that we had when we were investigating using it for a cross-platform game is that there currently is no networking support. You'll note that libcurl is included in the templates but AFAIK it is not working currently. I spent a few days getting http://pocoproject.org/ (a good c++ library for networking/xml/etc.) to build for iOS and Android (involves setting up lots of Android.mk files and using the NDK). But in the end I was having problems getting the Android-end to build properly w/ the NDK. I gave up for the time being.

So if you plan on building a cross-platform game that requires any type of network calls, cocos2d-x might not be the best choice at this time (hopefully it can be in the future).

Also if you want to share more than C++ source files between projects, maintaining two project trees might become difficult. I followed this tutorial to create a hybrid iOS/Android project structure, it's a bit outdated but gives you the general idea.
tehsuck
n00b
 
Posts: 1
Joined: Wed Apr 25, 2012 2:16 pm
Location: Upstate, NY
Has thanked: 0 time
Been thanked: 0 time

Re: Cocos2D-X for iOS and Android: Getting Started

Postby rwenderlich » Wed Apr 25, 2012 11:58 pm

@tehsuck: Good to know about networking, thanks for the tip!

Regarding the shared project structure, Jean-Yves originally had detailed instructions on how to do that in this tutorial but we decided to edit those out to keep things simple since this is an introductory tutorial. However his project at the end of part 2 has a nice combined directory structure that anyone who's interested in doing the same thing can take a look at.

If anyone's interested in a follow-up tutorial specifically on shared directory structures (or anything else related to Cocos2D-X), please let me know! :]
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Ray Wenderlich
Blog: http://www.raywenderlich.com
Twitter: http://twitter.com/rwenderlich
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
User avatar
rwenderlich
Team Member
Site Admin
 
Posts: 2155
Joined: Thu Dec 23, 2010 4:14 pm
Has thanked: 28 times
Been thanked: 338 times

Next

Return to Official Tutorials

Who is online

Users browsing this forum: No registered users and 10 guests