Setting up Cocos2d-x 3.15

SETTING UP COCOS2D-X 3.15 on Mac

  1. Create SDK folder in your Applications\Development folder.
  2. Download Latest cocos2d-x-3.15.1.zip and extract in SDK folder.
  3. Download Latest Apache ANT: apache-ant-1.10.1-bin and extract in SDK folder.
  4. Download Latest Android Studio: android-studio-ide-162.4069837-mac.dmg and install. Note SDK location: /Users/[username]/Library/Android/sdk
  5. Install latest NDK from Android Studio SDK Manager. Note NDK location: /Users/[username]/Library/Android/sdk/ndk-bundle
  6. Download Latest iOS SDK and Xcode from App Store

SETTING UP COCOS2D-X for ANDROID

  1. Open Terminal
  2. Move to “cd /Applications/Development/SDK/cocos2d-x-3.15.1”
  3. Type “python ./setup.py
  4. Setup NDK Root: /Users/[username]/Library/Android/sdk/ndk-bundle
  5. Setup SDK Root: /Users/[username]/Library/Android/sdk
  6. Setup ANT Root: /Applications/Development/SDK/apache-ant-1.10.1/bin
  7. Type “source /Users/melvin/.bash_profile” for changes to take effect

SETTING UP A NEW PROJECT

Type “cocos new GameTemplate -p eg.cocos2d.game -l cpp -d /Applications/Development/Game_Projects”

XCODE CHANGES (Using ElateGames_cocos2d-x_3.15_GameTemplate_Bare project)

  1. Open the Xcode project generated by cocos2d-x
  2. Add signing account. Note: Must have an Apple Developer Program
  3. Attach your iPhone/iPad/iPod device to your Mac.

You are ready to build on you device!

ANDROID STUDIO CHANGES (Using ElateGames_cocos2d-x_3.15_GameTemplate_Bare project)

  1. * Install missing platforms as needed: 22, 21
  2. * Install missing build tools as needed: 25.0.0
  3. * Update gradle as needed to 3.3
  4. Allow USB debugging on your device.
  5. * Note: If ProcessCpuTracker.cpp fails, add #include <unistd.h>

ElateGames Bare Cocos2d-X Project

Advertisements
Setting up Cocos2d-x 3.15