- 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
- 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 (Windows and Android)
- 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
Linux users can
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¶
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
Maybe you would like to Play a video on iOS under cocos2d-x
Another tutorial on Cross Platform (iOS / Android) Video Player: http://www.gethugames.in/blog/2013/09/cocos2d-x-cross-platform-video-player-ios.html
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
- Francis Styck’s examples
- Samsung Bada’s official sample:
- Ballon Ride
- Space Shooter Episode,Part1,Part2
- Wudi (Zynga China)’s sampleTiny Wings Remake on Android using Cocos2d-X
- TweeJump port
- Chris Wong’sBTris is recently updated to cocos2d-x 1.0.1