Beginning Android 4 Games Development

Book description

Beginning Android 4 Games Development offers everything you need to join the ranks of successful Android game developers. You'll start with game design fundamentals and programming basics, and then progress toward creating your own basic game engine and playable games. This will give you everything you need to branch out and write your own Android games.

The potential user base and the wide array of available high-performance devices makes Android an attractive target for aspiring game developers. Do you have an awesome idea for the next break-through mobile gaming title? Beginning Android 4 Games Development will help you kick-start your project.

The book will guide you through the process of making several example games for the Android platform, and involves a wide range of topics:

  • The fundamentals of game development, including new Android 4.0 Ice Cream Sandwich SDK APIs and features

  • The Android platform basics to apply those fundamentals in the context of making a game

  • The design of 2D and 3D games and their successful implementation on the Android platform

What you'll learn

  • How to set up and use the development tools for developing your first Android application

  • The fundamentals of game programming in the context of the Android platform

  • The fundamentals of game programming in the context of the Android platform

  • How to use the Android's APIs for graphics, audio, and user input to reflect those fundamentals

  • How to develop two 2D games from scratch, based on the Canvas API and OpenGL ES

  • How to create a full-featured 3D game

  • How to publish your games, get crash reports, and support your users

  • How to complete your own playable 2D OpenGL games

Who this book is for

This book is for people with a basic knowledge of Java who want to write games on the Android platform. It also offers information for experienced game developers about the pitfalls and peculiarities of the platform.

Table of contents

  1. Title
  2. Dedication
  3. Contents at a Glance
  4. Contents
  5. About the Authors
  6. Acknowledgments
  7. Introduction
    1. A Word About the Target Audience
    2. How This Book Is Organized
    3. Getting the Source Code
  8. Chapter 1: Android, the New Kid on the Block
    1. A Brief History of Android
    2. Fragmentation
    3. The Role of Google
    4. Android's Features and Architecture
    5. The Software Development Kit
    6. The Developer Community
    7. Devices, Devices, Devices!
    8. Compatibility Across All Devices
    9. Mobile Gaming Is Different
    10. Summary
  9. Chapter 2: First Steps with the Android SDK
    1. Setting Up the Development Environment
    2. Hello World, Android Style
    3. Running and Debugging Android Applications
    4. Summary
  10. Chapter 3: Game Development 101
    1. Genres: To Each One's Taste
    2. Game Design: The Pen Is Mightier Than the Code
    3. Code: The Nitty-Gritty Details
    4. Summary
  11. Chapter 4: Android for Game Developers
    1. Defining an Android Application: The Manifest File
    2. Android API Basics
    3. Best Practices
    4. Summary
  12. Chapter 5: An Android Game Development Framework
    1. Plan of Attack
    2. The AndroidFileIO Class
    3. AndroidAudio, AndroidSound, and AndroidMusic: Crash, Bang, Boom!
    4. AndroidInput and AccelerometerHandler
    5. CompassHandler
    6. AndroidGraphics and AndroidPixmap: Double Rainbow
    7. AndroidGame: Tying Everything Together
    8. Summary
  13. Chapter 6: Mr. Nom Invades Android
    1. Creating the Assets
    2. Setting Up the Project
    3. MrNomGame: The Main Activity
    4. The Main Menu Screen
    5. The HelpScreenClass(es)
    6. The High-Scores Screen
    7. Abstracting…
    8. Summary
  14. Chapter 7: OpenGL ES: A Gentle Introduction
    1. What is OpenGL ES and Why Should I Care?
    2. Before We Begin
    3. GLSurfaceView: Making Things Easy Since 2008
    4. GLGame: Implementing the Game Interface
    5. Look Mom, I Got a Red Triangle!
    6. Specifying Per Vertex Color
    7. Texture Mapping: Wallpapering Made Easy
    8. Indexed Vertices: Because Re-use is Good for You
    9. Alpha Blending: I Can See Through You
    10. More Primitives: Points, Lines, Strips, and Fans
    11. 2D Transformations: Fun with the Model-View Matrix
    12. Optimizing for Performance
    13. Summary
  15. Chapter 8: 2D Game Programming Tricks
    1. Before We Begin
    2. In the Beginning ... There Was the Vector
    3. A Little Physics in 2D
    4. Collision Detection and Object Representation in 2D
    5. A Camera in 2D
    6. Texture Atlas: Because Sharing Is Caring
    7. Texture Regions, Sprites, and Batches: Hiding OpenGL ES
    8. Sprite Animation
    9. Summary
  16. Chapter 9: Super Jumper: A 2D OpenGL ES Game
    1. Core Game Mechanics
    2. A Backstory and Art Style
    3. Screens and Transitions
    4. Defining the Game World
    5. Creating the Assets
    6. Implementing Super Jumper
    7. To Optimize or Not to Optimize
    8. Summary
  17. Chapter 10: OpenGL ES: Going 3D
    1. Before We Begin
    2. Vertices in 3D
    3. Perspective Projection: The Closer, the Bigger
    4. Z-buffer: Bringing Order into Chaos
    5. Defining 3D Meshes
    6. Matrices and Transformations Again
    7. Summary
  18. Chapter 11: 3D Programming Tricks
    1. Before We Begin
    2. Vectors in 3D
    3. Lighting in OpenGL ES
    4. Mipmapping
    5. Simple Cameras
    6. Loading Models
    7. A Little Physics in 3D
    8. Collision Detection and Object Representation in 3D
    9. Summary
  19. Chapter 12: Droid Invaders: The Grand Finale
    1. Core Game Mechanics
    2. A Backstory and Art Style
    3. Screens and Transitions
    4. Defining the Game World
    5. Creating the Assets
    6. Plan of Attack
    7. The Assets Class
    8. The Settings Class
    9. The Main Activity
    10. The Main Menu Screen
    11. The Settings Screen
    12. The Simulation Classes
    13. The GameScreen Class
    14. The WorldRender Class
    15. Optimizations
    16. Summary
  20. Chapter 13: Publishing Your Game
    1. A Word on Testing
    2. Becoming a Registered Developer
    3. Signing Your Game's APK
    4. Putting Your Game on the Market
    5. The Developer Console
    6. Summary
  21. Chapter 14: What's Next?
    1. Getting Social
    2. Location Awareness
    3. Multiplayer Functionality
    4. OpenGL ES 2.0 and More
    5. Frameworks and Engines
    6. Resources on the Web
    7. Closing Words
  22. Index

Product information

  • Title: Beginning Android 4 Games Development
  • Author(s): Mario Zechner, Robert Green
  • Release date: December 2011
  • Publisher(s): Apress
  • ISBN: 9781430239871