Go to the Cocos2d-x framework directory. This is the same one that we've been using to check on the test projects, only now you want to open the
create-android-project.sh
file in a text editor of your choice. (Also notice the other scripts for the various targets.)Look for where the paths for
NDK_ROOT
andANDROID_SDK_ROOT
are being set.Change the values there to the paths in your system. Since I have mine inside the eclipse folder in Applications, it looks like this:
# set environment parameters NDK_ROOT_LOCAL="/applications/eclipse/android-ndk-r8d/" ANDROID_SDK_ROOT_LOCAL="/applications/eclipse/android-sdk-macosx/"
Save the file and close it. Now open Terminal.
Type in
cd
(that is,cd
and a space).Drag the framework folder to the Terminal window; mine says
cocos2d-2.0-x-2.0.4
.Hit Enter.
Now type in the following line:
./create-android-project.sh
Hit Enter. You will be asked to enter a package name for your project. You will see the...
Cocos2d-X by Example Beginner's Guide
By :
Cocos2d-X by Example Beginner's Guide
By:
Overview of this book
<p>Cocos2d-x is the C++ port of arguably the most popular open source 2D framework in the world. Its predecessor was limited to the Apple family but with Cocos2d-x you can take your applications to all major app stores, with minimum extra work. Give your games a larger target audience with almost no extra hassle.<br /><br />"Cocos2d-X by Example Beginner's Guide" allows you to build your own cross platform games using all the benefits of a time tested framework, plus the elegance and simplicity of C++.</p>
<p>Each of the six games developed in this book will take you further on the road to becoming an expert game developer with no fuss and plenty of fun.<br /><br />Follow six tutorials for six very different games that leverage the ease of Cocos2D-X and its quick implementation, moving from simple ideas to more advanced topics in game development.</p>
<p>In easy-to-follow steps, the book teaches you how to take full advantage of the framework by adding animations and special effects, implementing a physics engine, and optimizing your games.</p>
<p>Prepare your project for multiple platforms and learn how to take your game concepts to completion.</p>
<p>"Cocos2d-X by Example Beginner's Guide" will present to you, in six different games, the topics necessary to build some of the most popular and fun types of games today.</p>
Table of Contents (19 chapters)
Cocos2d-x by Example Beginner's Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
Installation
You plus C++ plus Cocos2d-x
Your First Game – Air Hockey
Fun with Sprites – Sky Defense
On the Line – Rocket Through
Quick and Easy Sprite – Victorian Rush Hour
Adding the Looks – Victorian Rush Hour
Getting Physical – Box2D
The Last Game – Eskimo
Code Once. Retire.
Vector Calculations with Cocos2d-x
Pop Quiz Answers
Index
Customer Reviews