#Android ndk 10d android#
After it finishes, plug your Android device to your computer, then you can easily run the template HelloWorld code by typing the following command within your new project's path: It will take a while, since it will copy all the framework files to your new project's path. Therefore, you can create your project at any location, and not just inside the projects directory, as it was in the previous versions. The –l cpp parameter means that the new project is going to use C++ as the programming language, which is the only one that is covered in this book.Ĭocos2d-x 3.x, as opposed to branch 2.x, allows you to create your project outside of the framework directory structure. Take in to consideration that the package name should contain exactly two dots, as the example shows, if it has less or more, then the project creation script will not work. This script has created an Android template code for your game that will run in all the Android devices containing the Android API 9 or higher, that is Android 2.3 (Gingerbread) and later. Finally, close the terminal, and open a new one so that the changes can take effect.Ĭocos new MyGame -p com.your_company.mygame -l cpp -d NEW_PROJECTS_DIR Then, it will require you to set ANT_ROOT, where you will specify the root directory of your ant installation.
#Android ndk 10d install#
Secondly, it will require you to specify ANDROID_SDK_ROOT, here you will specify the directory path from where you have chosen to install the Android SDK during the installation process. It will require you to specify ANDROID_NDK_PATH, here you will specify the root directory of the NDK that you have previously uncompressed in the previous sections. In order to configure Cocos2d-x, open your system terminal and point to the path where you have uncompressed it, and type setup.py. Be aware that this page also has the link for downloading the Cocos2d-x branch 2, which is not covered in this book, and the manufacturer has officially announced that the new features will only be available in branch 3.Īfter downloading the compressed Cocos2d-x source code, uncompress it to your desired location. Finish by integrating Cocos2d-x C++ code with native Android code to launch games with the classic Java Android application. Through the creation of a real game, you will explore the core components of development including Physics, enabling you to create realistic sprite movements, and particle systems to dynamically simulate explosions, fire, rain, and smoke, as well as exploring the sound engine to make your game more robust. You will understand major framework improvements to render objects at lightning speed, extend and maintain code easily, and improve the label API to add great functionality such as glow, shadows, and outlines to labels.
Starting with a vital primer to get you up and running with your development environment, you will quickly dive in to exploring the latest version of this framework.
It wraps all the essential elements needed for creating a game, making the task of game building very developer-friendly. Cocos2d-x is a multi-platform C++ gaming framework in active development maintained by Chukong technologies.