Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Building Android Games with Cocos2d-x

You're reading from   Building Android Games with Cocos2d-x Learn to create engaging and spectacular games for Android using Cocos2d-x

Arrow left icon
Product type Paperback
Published in Mar 2015
Publisher Packt
ISBN-13 9781785283833
Length 160 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Raydelto Hernandez Raydelto Hernandez
Author Profile Icon Raydelto Hernandez
Raydelto Hernandez
Arrow right icon
View More author details
Toc

Table of Contents (10) Chapters Close

Preface 1. Setting Up Your Development Environment 2. Graphics FREE CHAPTER 3. Understanding Game Physics 4. User Input 5. Handling Text and Fonts 6. Audio 7. Creating Particle Systems 8. Adding Native Java Code Index

Setting up Java

The Android platform technology stack is based on the Java technology; that is why the first item to be downloaded will be the Java Development Kit (JDK). Although Java JDK 8 is the latest version at the time of writing this book, it is not officially supported by all Android versions, so we will download JDK 6, all the template Java codes generated by Cocos2d-x can be successfully compiled with this version.

Note

Java Runtime Environment (JRE) is not enough for building the Android applications, since it only contains the files required for running the Java applications, but it does not contain the tools required for building the Java applications.

You can download the JDK 6 from Oracle at http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase6-419409.html regardless of your development environment.

If Windows is your current environment, then after installing JDK you are required to add the path of the binaries folder to the PATH environment variable. This path will look like this: C:\Program Files\Java\jdk1.6.0_45\bin.

Open a new system console and type javac –version, if Java compiler's version number is displayed, then you have successfully installed JDK in your system.

Note

JDK 7 is required for building the applications for Android 5.0 and higher. You should download this version if you are targeting the latest Android versions. But, if you want your game to be compatible with the Android versions that are older than 4.4, then you should pick JDK 6.

lock icon The rest of the chapter is locked
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
Banner background image