- External Tutorials
Setting up the Develop Environment¶
- Mac OSX users can refer to:
- The best one, Getting Started with Cocos2d-x for iOS and Android, written by Jean-Yves Mengant, using Xcode and Eclipse.
- This tutorial wirtten by SuperSuRaccon also works, and it has a video on youtube
- Windows users
- We mostly have headache with the complication of installing Android NDK and Cygwin in NDK r6 and before, try this tutorial How to setup Cocos2d-x
- Since Android NDK r7, developers can build NDK source files on Windows without Cygwin, so install a windows dev env without cygwin is possible, This blog describe how to achieve it. Note that
ndk-gdbdoes not work on Windows, so you still need Cygwin to debug.
- Jesus Bosch wrote a good tutorial for setting up android + win32 cocos2d-x development environment on win7
- [spanish] Tutorial based on posts of Jesús Bosch and Jean-Yves Mengant Developing mobile apps for cross-platform
- Finally, Installation and First run listed how to run HelloWorld and Test, how to create cocos2d-x project form scripts on each supported platform
Concepts You Need to Know¶
- Cocos2d Basic Concepts are universally among all cocos2d branches, including cocos2d-iphone, cocos2d-x and cocos2d-html5. You can refer to cocos2d-iphone's Programming Guide for more details
- Many developers are confused by Standard Touch Delegate & Targeted Touch Delegate,
- Cocos2d-x used reference count for Memory Management in Cocos2d-x. It's similar to Objective-C's NSAutoreleasePool mechanic. You should carefully use retain/release/autorelease to prevent from crashing.
- Creating a hybrid project such as HelloWorld and Tests cannot be automatically isn't supported by IDEs such as Xcode and Visual Studio. If you need one, please refer to gmeit.ro's Creating hybrid project
- You should know some platform limitations when writing a multi-platform game
- multi-touch, multi-resolution is frequently asked in the forum
- You should know How to use jni if you want to wrap android sdk APIs to C++. It's VERY IMPORTANT !
- Work with CocosBuilder will speed up your development evidently.
- Using CocosBuilder on Cocos2D-X games by Jesus Bosch
- Integrating 3rd party SDK
- Integrate cocos2d-x opengl views into an UIViewController on iOS / UIKit
- Integrate cocos2d-x activities into a classic Java Android application
- Maybe you would like to Play a video on iOS under cocos2d-x
- Build a simple prototype for Physics based Platformer game
- Build a Spinning Globe by using Masking
- Work with Box2D
- Scrolling scenes, using CCParallaxNode, refer to Space game example on raywenderlich.com
- InfiniteParallax Class, to repeat same backgrounds all time.
- Slider code and its video. If you're using v2.0 and higher version, I suggest you to use extensions/CCControlExtension/CCControlSlider
- Split Screen using 2 layers
- Sharped Label TTF, better labels
- Clawoo's examples