-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Android Game Programming By Example
By :
All the code in this book and the download bundle will work in your favorite Android IDE. However, I found the latest version of Android Studio exceptionally friendly to use and the code was written and tested in it as well.
If you don't currently use Android Studio, I encourage you to give it a try. Here is a quick overview of how to get up and running quickly. This guide includes steps to install the Java JDK in case you are completely new to Android development.
If you already have your preferred development environment ready to go then jump straight to Chapter 2, Tappy Defender – First Step.
The first thing we need to do is prepare your PC to develop for Android using Java. Fortunately, this is made quite simple for us.
If you are learning on Mac or Linux everything in this book will still work. The next two tutorials have Windows-specific instructions and screenshots. However, it shouldn't be too difficult to vary the steps slightly to suit Mac or Linux.
All we need to do is:
The first thing we need to do is get the latest version of the JDK. To complete this guide, perform the following instructions:



downloads folder, double-click on the file you just downloaded. The latest version at the time of writing for a 64-bit Windows PC was jdk-8u5-windows-x64. If you are using Mac/Linux or have a 32-bit OS, your filename will vary accordingly.
The JDK is now installed. Next, we will make sure that Android Studio is able to use the JDK.

JAVA_HOME for Variable name: and enter C:\Program Files\Java\jdk1.8.0_05 for the Variable value: field. If you installed the JDK somewhere else, then the file path you enter in the Variable value: field will need to point to wherever you put it. Your exact file path will likely have a different ending to match the latest version of Java at the time you downloaded it.;JAVA_HOME. Be sure not to miss the semicolon from the beginning.The JDK is now installed on our PC.
Without delay, let's get Android Studio installed, and then we can begin our first game project. Visit:
https://developer.android.com/sdk/index.html
android-studio-bundle-135.12465-windows.exe file and click on Run as administrator. The end of your filename will vary depending on the version of Android Studio and your operating system.

That was the last piece of software we needed. We will begin to use Android Studio straight away in the next chapter.
Change the font size
Change margin width
Change background colour