70

I'm developing a game using Cocos2d-x to Android and iPhone. At the beggining, I had a lot of problems to start using this library, so, in this question, I want to collect all basic, medium and expert tutorials because there are a lot of info questions doing the same mistakes. When I Started, I had to look a lot in many sites using my friend Google. Hope this helps people start now. All in c++.

Beginners

  • Official wiki links
  • How to start in multi-platform HERE The best one. Amazing, XCODE (MAC) and ECLIPSE (LINUX) tutorial.
  • A simple guide to Start
  • Another multi-platform Guide
  • Awesome guide to start programming on Eclipse + Android and DEBUG, thanks to Marcio Andrey
  • Another way to integrate cocos2d-x on Android
  • Social Example, Facebook + email + Twitter on iOS and Android HERE

Medium

ADVANCED

  • Integrating OpenFeint with cocos2d-x. I only found This example, Here more details.
  • Archievement on GameCenter. Here

Extensions

Code Examples

TIPS

  • Audio format Supported
  • If you use Linux, please, don't use cocos2d-android or cocos2d-android-1, is decreated. Try to use cocos2d-x

  • If you use Linux, and don't know how to use native code, Take a look in development

  • CCLOG("String"); Don't work on Eclipse log cat, but CCLog do it!

  • Max textures size/resolution Here

  • Iphone use RETINA to draw textures in HD, but don't are used on Android. My solution is use RETINA on iphone, and setscale compiling only in Android. Multi-resolution Wiki. In Example:

    #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
    this->setObjectScale(1);
    #endif  // CC_PLATFORM_IOS
  • Your first example must be the official on the WIKI

** OFFICIAL PAGE COCOS2D-X **

What will need this question?

  • XML Tutorial, i have nothing in this area. Actually, i'm working in some code. I will do a Tutorial. The library can be use is libxml2
  • Creating menus example
  • Slider menu example
  • Gestures class don´t implemented yet

If you have problems, use tag Cocos2d-x in Stackoverflow, and I will try to help you.

I have already read the FAQ but 90 % of questions cocos2d/android related present the same problem, using obsolete libraries. I just want help people to start using cocos2d-x. All additional info will be Welcome.

Community
  • 1
  • 1
vgonisanz
  • 11,352
  • 12
  • 74
  • 123
  • 5
    @jptsetung, i´m looking for the completest guide to use cocos2d-x, because is very difficult to start using it without help. So, i´m looking people to answer this question. Take a look here -> http://blog.stackoverflow.com/2011/07/its-ok-to-ask-and-answer-your-own-questions/ – vgonisanz Jun 11 '12 at 11:27
  • 1
    You should make this question community wiki, so that we can add this in FAQ. – noob Jul 09 '12 at 07:05
  • I need to know how to read xml files. is the any tutorial yet? – Fugogugo Jul 31 '12 at 06:41
  • Cocos2d-x is going to change the library to read XML, im waiting to prepare 1 tutorial – vgonisanz Jul 31 '12 at 06:59
  • @Piperoman: have you seen the [Paralaxer Cocos2d-X](http://paralaxer.com) example game project? – Nathanael Weiss Sep 21 '12 at 15:28
  • Yes, it was released 1 month ago. But is too expensive to buy source :D – vgonisanz Sep 21 '12 at 15:29
  • 1
    @Fugogugo: Cocos2d-X does have built-in XML support to read files on the Android platform and parse property lists. However, it's not something they've simplified, exported, or made available to use in your game's code. I highly recommend using [TinyXML2](http://www.grinninglizard.com/tinyxml2/index.html) to read your XML files. – Nathanael Weiss Sep 21 '12 at 15:30
  • 1
    Meta question about this question here: http://meta.stackexchange.com/questions/155531/question-is-very-popular-but-closednot-constructive-shouldnt-it-be-reopened – George Stocker Nov 13 '12 at 13:22

6 Answers6

8

Another code example: Tiny Wings Remake on Android using Cocos2d-X

Di Wu
  • 6,355
  • 3
  • 33
  • 51
6

Good list. The Angry Ninjas Starter Kit will have a Cocos2d-X update soon.

6

Cocos2d-x within uikit tutorial http://jpsarda.tumblr.com/post/24983791554/mixing-cocos2d-x-uikit

jptsetung
  • 8,668
  • 3
  • 38
  • 49
6

https://github.com/dualface/cocos2d-x-extensions/blob/master/TODO.tasks , he is developing nice features on cocos2d-x

5

Cocos2d-x within your classic Android (Java) app tuto http://jpsarda.tumblr.com/post/26000816688/integrate-cocos2d-x-c-into-an-android-application

jptsetung
  • 8,668
  • 3
  • 38
  • 49
4

Here you got complementaries discussions about the topic, it can be interesting.

discussion1

discussion2

Community
  • 1
  • 1
Jav_Rock
  • 21,011
  • 18
  • 115
  • 164
  • 1
    Recommended :http://www.raywenderlich.com/11283/cocos2d-x-for-ios-and-android-getting-started – NIKHIL Aug 15 '12 at 09:54