Pro Android Games

By Vladimir Silva

Do you remember landmark games like Wolfenstein 3D, Doom, and Asteroids? Well, here's an exciting opportunity to build and/or port these games to one of the hottest mobile and netbooks platforms today: Google's Android.

Full Description

  • ISBN13: 978-1-4302-2647-5
  • User Level: Intermediate to Advanced
  • Publication Date: December 27, 2009
  • Available eBook Formats: EPUB, MOBI, PDF
  • Print Book Price: $39.99
  • eBook Price: $27.99
Buy eBook Buy Print Book Add to Wishlist

Related Titles

Full Description

Do you remember landmark games like Wolfenstein 3D, Doom, and Asteroids? Well, here’s an exciting opportunity to build and/or port these games to one of the hottest mobile and netbooks platforms today: Google’s Android.

Pro Android Games teaches you how to build cool games like Space Blaster and the classic Asteroids from scratch on the latest Android platform. This book also shows you how to port other classic freeware/shareware games like Doom and Wolfenstein 3D from C using the Java Native Interface (JNI) for Android.

This book is all about a unique perspective in Android game development: a well-balanced, powerful combination of pure Java and hybrid game development, mixing Java and C. By combining the elegant object-oriented features of Java and the raw power of C, there is no limit to the types of games that you can build for the platform. With actionable real-world source code in hand, this book allows you to dive right into games development on Android. You’ll definitely have fun, and perhaps you’ll even make some money. Enjoy!

What you’ll learn

  • How to write/port advanced 3D games for any Android device.
  • How to setup a Linux system for hybrid game compilation.
  • How to combine Java and C code in an elegant manner by building a simple Java application on top of a native library.
  • How to tackle pure Java gaming with two practical games: Space Blaster and the arcade classic Asteroids.
  • How to mix OpenGL API calls in Java and C for high performance 3D graphics using the 3D cubes sample by Google.
  • How to bring two of the greatest PC 3D shooters to the Android platform: Wolfenstein 3D and Doom using Java and C.

Who this book is for

This book is for Google Android developers interested in game application development in Java or porting existing C-based games via JNI into Android and developing/deploying from there. It is targeted to developers who already know such basics of Android development as activity, view, and layout. Additionally, it assumes that you are a seasoned game developer in Java and C, and have a basic knowledge of Linux and Shell Scripting.

Table of Contents

Table of Contents

  1. Welcome to Android Gaming
  2. Compiling Native Code in Android
  3. Building a Java Game from Scratch
  4. Java Games Continued: Fun with Polygons
  5. Hybrid 3D Graphics with OpenGL and JNI
  6. 3D Shooters Episode I: Wolfenstein 3D for Android
  7. 3D Shooters Episode II: Doom for Android
Source Code/Downloads

Downloads are available to accompany this book.

Your operating system can likely extract zipped downloads automatically, but you may require software such as WinZip for PC, or StuffIt on a Mac.

Errata

Please Login to submit errata.

On page 16:

The ald script doesn't contain a definition for SYS_DEV

On page 47:

It seems the kernel is as of August 2009 no longer part of the default repo manifest so you'll have to download it yourself (see also http://stackoverflow.com/questions/1809774/android-kernel-compile-and-test-with-android-emulator).

Maybe it's useful to state so, somewhere in the book because I think it now assumes the kernel headers are part of the default repo manifest.

On page 266, 267,268:
The game cannot be run because the game download and installation failed.
Further check found that it is trying to download from http://playerx.sourceforge.net/gwad/plutonia.wad.gz ,
however the author's website is no longer valid.

Please assist to provide alternative website to download and install the game, so that it can be run correctly.


Author Comment:
The file plutonia.wad is copyrighted. You can download it from the web and save it in the device under /sdcard/doom.

The code should pick that up & bypass the download.