You are previewing Beginning Android Tablet Games Programming.
O'Reilly logo
Beginning Android Tablet Games Programming

Book Description

Android games programmers now have the power to write games for Android tablets. Beginning Android Tablet Games Programming explains how to enhance your Android games using the new tablet interface and the additional screen estate. You'll learn how to bring your programming skills up to date and into a world where touch screens, games physics, and artificial intelligence come together in new and surprising ways.

Beginning Android Tablet Games Programming shows how to quickly and easily set up an Android development environment—in no time at all, you'll be programming away. You'll begin with some simple games using sprites and choreographed movement. Next, you'll learn how to handle user input in the modern age of touch screens and motion.

Along the way, you'll discover how to use that extra screen space on a tablet to provide more relaxed and more interesting user interactions in your games. You'll learn how to use sound and music, for instance, to make your application menus more user-friendly.

The Android operating system has recently acquired multicore functionality to meet the demands of multicore devices now entering the tablet market. With Beginning Android Tablet Games Programming, you'll discover how to harness that new power with your games programming through more process-demanding and fun techniques, including physics modeling, rich game world representation, artificial intelligence, and multiplayer interactions.

Throughout each chapter of Beginning Android Tablet Games Programming, you'll find code that you can add or adapt to your own games to create the components you want. You can also work up to wrapping everything together into a complete Mario-type example game.

Finally, when you have your first games ready, learn how developers have released their games and made a profit. You'll find tips on how to present your games in the Android and other application markets, and a solid approach to games marketing and monetization.

What you'll learn

How to set up an Android tablet programming environment

How to program for touchscreens and other input devices

Techniques to take advantage of the extra screen size of a tablet

How to take advantage of multicore processing power in your games

How to program a multiplayer game

How to add artificial intelligence to in-game opponents

How to program game modes, game states, and game worlds

How to program a complete game

About in-app marketing and games monetization

Who this book is for

This is a book for Java programmers new to Honeycomb, tablets and games programming. An experienced games programmer can also use this book to migrate their existing expertise to the Android and the tablet environment.

Table of Contents

  1. Title
  2. Contents at a Glance
  3. Contents
  4. About the Author
  5. About the Technical Reviewer
  6. Acknowledgments
  7. Chapter 1: Setting Up Android 3.0 Java Development
    1. What Is Android?
    2. What You Need to Create Android Games
    3. Setting Up Your Android Tablet Programming Environment
    4. Putting Your Tools to the Test
    5. Summary
  8. Chapter 2: Creating Simple Games with Sprites and Movement
    1. Working with Images
    2. Getting a Professional Look
    3. Implementing Timing and Complex Motion
    4. Detecting Collisions
    5. Summary
  9. Chapter 3: Gathering User Input
    1. Understanding Tablet Input Options
    2. Understanding Tablet Input
    3. Responding to Touch
    4. Responding to Gestures
    5. Using Input Queues
    6. Responding to Sensor Data
    7. Using Sensor Data
    8. Summary
  10. Chapter 4: Adding Sound Effects, Music, and Video
    1. Getting Ready for Sounds
    2. Adding Music
    3. Adding Video
    4. Managing Music
    5. Summary
  11. Chapter 5: One-Player Game with Obstacles
    1. Planning a One-Player Game: AllTogether
    2. Building the One-Player Game
    3. Summary
  12. Chapter 6: A Ball and Paddle Game
    1. Getting Started
    2. Preparing the Game Environment
    3. Adding Collision Detection and Event Handling
    4. Adding Touch, Sound, and Rewards
    5. Summary
  13. Chapter 7: Building a Two-Player Game
    1. Understanding Multiplayer Games
    2. Building a Two-Player Peer-to-Peer Game
    3. Summary
  14. Chapter 8: A One-Player Strategy Game
    1. Introducing Harbor Defender
    2. Assembling Harbor Defender
    3. Debugging Harbor Defender
    4. Summary
  15. Chapter 9: A One-Player Strategy Game
    1. Enhancing the Game Sprites
    2. Creating the User Controls
    3. Putting Everything on the Screen
    4. Deploying and Managing the Attack Boats
    5. Firing the Cannons
    6. Managing Game Outcomes
    7. Analyzing the Game
    8. Summary
  16. Chapter 10: Publishing the Game
    1. Polishing the Application
    2. Packaging the Game
    3. Deploying the Game
    4. Marketing Your Game
    5. Summary
  17. Appendix A: Testing Android Games on a Real Device
  18. Index