Advanced Android 4 Games

Book description

"Wolfenstein 3D"-like and "Doom"-like game apps are some of the classic Android games presented in the original edition of this book. Since their release, Android has progressed with the debut of Android 4.0, adding better fonts, new User Interface and Experience (UI/UX) APIs, tablet considerations, multi-touch capabilities, multi-tasking, faster performance, and much more to the Android game app development repertoire.

Multi-touch code gives these games and their players dynamic input and exchange ability, for a more realistic arcade game experience. Faster and better performance offers game players a more seamless, fun arcade experience like never before on Android. There is also improved native C/C++ integration with Android's NDK as well, which makes coding, compiling, and converting both productive and efficient with gains in app performance.

With actionable real-world source, Advanced Android 4 Games shows you how to build more sophisticated and addictive Android games, harnessing the power of these recent advancements.

  • Coverage of the new UI, UX, multi-touch and multi-tasking features available with Android 4.0.

  • Learn other techniques for improving the game playing experience including Wi-Fi tethering, better multi-tasking, new and better streaming Web video using WebM, and more.

  • 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, such as the "Quake 3D"-like game app case study in this book.

You'll definitely have fun, and perhaps you'll even make some money. Enjoy!

What you'll learn

  • Key advanced Android gaming techniques using the new Android SDK 4 to help you earn more money in the app stores

  • How to compile native code (C) in Android using the NDK

  • How to add and integrate multi-touch

  • How to use Bluetooth controllers (Zeemote)

  • More gaming tricks and tips, such as hybrid 3D graphics with OpenGL and JNI

  • How to port and augment a 2D shooter game app similar to "Wolfenstein" for Android

  • How to port and augment another 2D shooter "Doom"-like game app for Android using OpenGL

  • How to build a 3D shooter game like "Quake"

  • How and where to best deploy these game apps

Who this book is for

This book is for savvy Android app developers who are looking for professional or advanced techniques for porting, augmenting and building 2D and 3D game apps that are complex, fun and lucrative.

Table of contents

  1. Title
  2. Dedication
  3. Contents at a Glance
  4. Contents
  5. About the Author
  6. About the Technical Reviewers
  7. Acknowledgment
  8. Introduction
    1. The Green Robot Has Taken Off
    2. Who's the Target Audience?
    3. Skills Needed to Make the Most of This Book
    4. What Hardware/Software Will You Need?
    5. What Makes This Book Unique?
    6. Android SDK Compatibility
    7. Chapter 1
    8. Chapter 2
    9. Chapter 3
    10. Chapter 4
    11. Chapter 5
    12. Chapter 6
    13. Chapter 7
  9. Chapter 1: Welcome to the World of the Little Green Robot
    1. Setting Up Your Machine
    2. Download and Install the SDK
    3. Configure your Eclipse
    4. Installing the Native Development Kit
    5. Creating an Android Emulator
    6. Configuring a Real Device
    7. Summary
  10. Chapter 2: Gaming Tricks for Phones or Tablets
    1. Compiling Native Code in Android
    2. Compiling the Shared Library
    3. Testing the App on a Device
    4. Java Wrappers for C/C++ Event Handling
    5. Multitouch Tricks
    6. Bluetooth Controllers (Zeemote)
    7. Summary
  11. Chapter 3: More Gaming Tricks with OpenGL and JNI
    1. The Power of Mobile Devices
    2. OpenGL the Java Way
    3. OpenGL the Native Way
    4. Scaling Video Buffers with Hybrid OpenGL ES
    5. Summary
  12. Chapter 4: Efficient Graphics with OpenGL ES 2.0
    1. OpenGL ES 2.0 and Android
    2. Invoking OpenGL ES 2.0 in Android
    3. Project Icosahedron
    4. Adding Swipe and Multi-Touch Pinch for Zooming
    5. Compiling and Running
    6. Summary
  13. Chapter 5: 3D Shooters for Doom
    1. The Sky Is the Limit with the Java/C Power Combo
    2. Bringing Doom to a Mobile Device
    3. Game Architecture for Doom
    4. Java Main Activity
    5. Handling Audio Independently of the Format
    6. Native Interface Class
    7. Native Layer
    8. Compiling Doom with the NDK
    9. Testing Doom in the Emulator
    10. Summary
  14. Chapter 6: 3D Shooters for Quake
    1. A Little About the Quake Jargon
    2. The Power of Code Reuse: Quake in Less Than 500 Lines of New Code
    3. Is the Software Renderer a Possible Solution?
    4. Quake for Android Architecture
    5. Changes Required to the Native Quake Engine
    6. Running on a Device
    7. Summary
  15. Chapter 7: 3D Shooters for Quake II
    1. Reviewing the Code
    2. Escaping the Shackles of the Java Heap
    3. Taming the Mighty Quake II Engine
    4. Building Quake II with the NDK
    5. Running on the Device or Emulator
    6. Quake II Performance on Multiple Devices
    7. Summary
  16. Appendix: Deployment and Compilation Tips
    1. Signing Your Application
    2. JNI Cheat Sheet
    3. Final Thoughts
  17. Index

Product information

  • Title: Advanced Android 4 Games
  • Author(s): Vladimir Silva
  • Release date: December 2011
  • Publisher(s): Apress
  • ISBN: 9781430240594