Wednesday, January 19, 2011

Pro Android Games Instaled

Pro Android Games will help you to create the best games for the Android platform. There are plenty of
books out there that tackle this subject, but only this book gives you a unique perspective by showing
you how easy it is to bring native PC games to the platform with minimum effort. This is done using realworld
examples and source code on each chapter. Keep in mind that, before you dig into this book, you will need a solid foundation in Java and ANSI C. I have made a great effort to explain the most complicated concepts as clearly and as simply as possible with a combination of graphics and sample code. The source code provided for each chapter will help you understand the concepts in detail and make the most of your time as a mobile game developer.

A Windows or Linux PC with a Java SDK Properly Installed
I guess this is kind of obvious, as most development for Android is done in Java. Note that I mentioned a Java SDK, not JRE. The SDK is required because of the JNI header files and command line tools used throughout the latter chapters.

Eclipse IDE and Android SDK Properly Installed
Eclipse is the de facto IDE for Android development. I have used Eclipse Galileo to create the workspace for the book; nevertheless, Eclipse Ganymede should work as well.

Even though Eclipse Galileo has been used to create the code workspace, you can use your favorite IDE. Of
course, that will require a bit of extra setup. You can get Eclipse Galileo from http://www.eclipse.org/.

For instructions on how to set up the Android SDK with other IDEs, such as IntelliJ or a basic editor, see
http://developer.android.com/guide/developing/other-ide.html.

Android SDK properly installed means two things:
 
1. You must install the Android SDK plug-ins for Eclipse:
a. From the IDE main menu click Help Install New Software.
b. Click the Add button to add a new Site and enter:
• A name: Android SDK
• A location: https://dl-ssl.google.com/android/eclipse/. Click OK.
c. Select the Android SK from the Available Software dialog and follow the easy installation instructions from the wizard.

2. You must install the Android SDK: It can be downloaded from the Android site above. Keep in mind that Eclipse must be told about the location of the Android SDK. From the main IDE menu click Window Preferences. On the left navigation menu select Android and enter the SDK location. I have used SDK 1.5 because that was the latest available by the time of this writing; however, the code in this book has been tested with SDK 1.6 and 2.0 (see the SDK compatibility section for details).

GNU C Compiler for ARM Processors
A GNU C compiler is required for the hybrid games in the book. These games combine Java code with a
native core library, hence the need for a C compiler that targets the mobile ARM processor. The compiler
used in this book and detailed in Chapter 1 is the Code Sourcery GNU G++ Toolkit. You are not bound,
however, to use this compiler; as a matter of fact, you can use any C compiler capable of generating ARM
code, including the Android Native Development Kit (NDK).

Chapter Source
This is an optional tool but it will help you greatly to understand the concepts as you move along. I have
made my best effort to describe each chapter as simply as possible. Nevertheless, some of the games
(especially Wolf 3D and Doom) have very large core engines written in C (100K lines for Doom), which
are poorly commented and very hard to understand. All in all you will see how easily these great
languages (Java and C) can be combined with minimal effort. Get the companion source for the book
from the publisher at http://www.apress.com. It was built using Eclipse Galileo.

Android SDK Compatibility
As a developer you may ask yourself about the SDK compatibility of the code in this book. This is an
important question as new versions of the Android SDK come out frequently. By the time of this writing,
Google released the Android SDK version 2.0. The code in this chapter has been tested with the following
versions of the Android SDK:
• SDK version 2.0
• SDK version 1.6
• SDK version 1.5
• SDK version 1.0

The bottom line is that the code in this book will run in any version of the SDK from 2.0 to 1.0, and that
was my intention all along. Virtually nothing has changed from versions 1.5 to 1.6 of the platform when it comes to game development. For a detailed list of API changes in version 1.6, see
http://developer.android.com/sdk/RELEASENOTES.html.

0 comments:

Post a Comment