Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Cocos2d-x by example (update)

You're reading from   Cocos2d-x by example (update) Unleash your inner creativity with the popular Cocos2d-x framework and learn how to build great cross-platform 2D games with this Cocos2dx tutorial

Arrow left icon
Product type Paperback
Published in Mar 2015
Publisher
ISBN-13 9781785288852
Length 270 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Roger Engelbert Roger Engelbert
Author Profile Icon Roger Engelbert
Roger Engelbert
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Installing Cocos2d-x FREE CHAPTER 2. You Plus C++ Plus Cocos2d-x 3. Your First Game – Air Hockey 4. Fun with Sprites – Sky Defense 5. On the Line – Rocket Through 6. Quick and Easy Sprite – Victorian Rush Hour 7. Adding the Looks – Victorian Rush Hour 8. Getting Physical – Box2D 9. On the Level – Eskimo 10. Introducing Lua! A. Vector Calculations with Cocos2d-x B. Pop Quiz Answers Index

Time for action – downloading, downloading, downloading

We start by downloading the necessary SDKs, NDKs, and general bits and bobs:

  1. Go to http://www.cocos2d-x.org/download and download the latest stable version of Cocos2d-x. For this book, I'll be using version Cocos2d-x-3.4.
  2. Uncompress the files somewhere in your machine you can remember later. I recommend that you add all the files we're going to download now to the same folder.
  3. Go ahead and download the Code IDE as well. We'll be using this in the last chapter in this book.
  4. Then, go to http://developer.android.com/sdk/installing/installing-adt.html and download the Eclipse ADT plugin (if you don't have Eclipse or the Android SDK installed, download them at https://eclipse.org/downloads/ and http://developer.android.com/sdk/installing/index.html?pkg=tools, respectively).

    Note

    If you have any problems installing the ADT plugin, you will find complete instructions at http://developer.android.com/sdk/installing/installing-adt.html.

  5. Now, for Apache Ant, go to http://ant.apache.org/bindownload.cgi and look for the links to the compressed files, and download the .zip one.
  6. Lastly, go to https://developer.android.com/tools/sdk/ndk/index.html and download the latest version of the NDK for your target system. Follow the installation instructions on this same page on how to extract the files as some systems will not allow these to be self-extractable. A word of warning: you must use a version of the NDK above r8e with Cocos2d-x 3.x.

What just happened?

You have successfully downloaded everything you'll need to set up Cocos2d-x in your machine and start development. If you are using a Mac, you will probably need to change your security settings in System Preferences to allow Eclipse to run. Also, go ahead and open the Android SDK Manager inside Eclipse by going to the Window-Android SDK Manager menu, and install the packages for at least Version 2.3.3 and then anything above that you might wish to target.

Also, make sure you have Python installed in your machine. Inside Terminal or command prompt, just type the word python and hit enter. If you don't have it installed, visit https://www.python.org/ and follow the instructions there.

So by the end of this step you should have Cocos2d-x, CocosIDE, the Android SDK the NDK, and Apache Ant all extracted inside a folder.

Now let's install Cocos2d-x.

You have been reading a chapter from
Cocos2d-x by example (update)
Published in: Mar 2015
Publisher:
ISBN-13: 9781785288852
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime