Android Game Programming For Dummies

( 1 )


Learn how to create great games for Android phones

Android phones are rapidly gaining market share, nudging the iPhone out of the top spot. Games are the most frequently downloaded apps in the Android market, and users are willing to pay for them. Game programming can be challenging, but this step-by-step guide explains the process in easily understood terms. A companion Web site offers all the programming examples for download.

  • Presents ...
See more details below
$23.58 price
(Save 32%)$34.99 List Price

Pick Up In Store

Reserve and pick up in 60 minutes at your local store

Other sellers (Paperback)
  • All (17) from $10.88   
  • New (12) from $18.17   
  • Used (5) from $10.88   


Learn how to create great games for Android phones

Android phones are rapidly gaining market share, nudging the iPhone out of the top spot. Games are the most frequently downloaded apps in the Android market, and users are willing to pay for them. Game programming can be challenging, but this step-by-step guide explains the process in easily understood terms. A companion Web site offers all the programming examples for download.

  • Presents tricky game programming topics—animation, battery conservation, touch screen input, and adaptive interface issues—in the straightforward, easy-to-follow For Dummies fashion
  • Explains how to avoid pitfalls and create fun games based on best programming practices for mobile devices
  • A companion web site includes all programming examples

If you have some programming knowledge, Android Game Programming For Dummies will have you creating cool games for the Android platform quickly and easily.

Read More Show Less

Product Details

  • ISBN-13: 9781118027745
  • Publisher: Wiley, John & Sons, Incorporated
  • Publication date: 12/26/2012
  • Series: For Dummies Series
  • Edition number: 1
  • Pages: 384
  • Sales rank: 613,182
  • Product dimensions: 7.30 (w) x 9.10 (h) x 1.00 (d)

Meet the Author

Derek James is the principal and founder of Polyclef Software, LLC, a creator of Android games including WordWise Pro, Golf Solitaire, Proxity, Puzzle Lords Free, and Spades, among others. Derek created some of the first Android games on the market.

Read More Show Less

Table of Contents

Introduction 1

Why You Need This Book 1

Conventions Used in This Book 2

Technical Considerations 2

How This Book Is Organized 3

Part I Adopting the Android Gaming Mindset 3

Part II Starting to Program 4

Part III Making Your First Game: Crazy Eights 4

Part IV Moving On to Your Second Game: Whack-a-Mole 4

Part V Managing Your Game in the Market 4

Part VI The Part of Tens 5

Icons Used in This Book 5

Where to Go from Here 6

Part 1 Adopting the Android Gaming Mindset 7

Chapter 1 Getting to Know Android Gaming 9

Seeing the Potential of the Android Platform 9

Where Android came from 10

And where it's going 10

What You Must Know about the Mobile Gaming Industry 11

Handhelds and smartphones 11

iOS or Android 11

How Android Is Suited to Mobile Gaming 13

Growth 13

Freedom 14

Potential 14

Thinking Through Your Game Project 14

Designing first 15

Following a structured development process 19

Deciding on distribution 20

Knowing What Tools You Need 21

Capitalizing on Your Game 22

The tried-and-true approaches 22

Chapter 2 Designing Your Game 27

Deciding What Kind of Game to Make 27

Genre 28

Number of players 29

Thinking about how and when people will play your game 31

Identifying Your Target Audience 34

The Android user base 35

Casting a wide net or finding a niche 36

Targeting Devices 37

Firmware 38

Hardware 39

Designing the interface and controls 43

Finding and/or creating resources (graphics and sound) 46

Chapter 3 Setting Up Your Development Environment 51

Starting at the Beginning 51

Downloading and Installing Eclipse 53

Installing the Software 57

Installing the SDK 57

Installing the ADT 58

Connecting Eclipse to the SDK 61

The Android Virtual Device (AVD) Manager 61

Creating a virtual device 62

Launching a virtual device 66

Creating an Android Project 67

Running an Android App 71

Manual launch control 71

Starting apps 73

Part II Starting to Program 77

Chapter 4 Dissecting an Android App 79

Creating a New Project 79

Taking the Bird's Eye View of a Project 83

Editing the Manifest 83

Naming and versioning your game 84

Targeting versions 85

Declaring activities 85

Setting permissions 86

Targeting different screen sizes 87

Organizing Resources 88

Drawables 89

Layouts 91

Strings 93

Styles 94

Themes 94

Sounds 95

Organizing the Source Directory 95

Understanding Activities 97

The lifecycle of an activity 98

Using Views 101

Differences between View and SurfaceView 101

Instantiating a custom view 102

Drawing in a view 103

Handling input 106

Part III Making Your First Game: Crazy Eights 109

Chapter 5 Creating a Simple Title Screen 111

Creating a Custom View 111

Loading the Title Graphic 113

Drawing the Title Graphic 115

Handling Screen Orientation 119

Controlling Screen Timeout 121

Making the Game Full-Screen 122

Adding buttons 124

Handling Button States 127

Launching the Play Screen 129

Intents 133

Bundles 134

Chapter 6 Creating a Basic Play Screen 135

Displaying Cards 135

Loading the card images 135

Dealing the cards 139

Displaying the game state 141

Taking Your Turn 152

Handling turns 152

Picking up cards 156

Playing cards 161

Showing dialog boxes (and toasts) 164

Taking cards from the draw pile 172

Advancing play 175

Chapter 7 Finishing Your First Game 181

Ending Hands and Games 181

Ending a hand 181

Ending a game 189

Wrapping Up the Game 192

Coding the opponent AI 192

Making your own launcher icon 195

Part IV Moving On to Your Second Game: Whack-a-Mole 199

Chapter 8 Creating a Complex Title Screen 201

Using SurfaceView 202

Adding an Options Menu 212

Toggling the Sound Option 213

Chapter 9 Creating an Animated Play Screen 217

Handling Images for the Play Screen 217

Making Simple Animations 223

Handling User Interaction 228

Loading and Playing Sounds 234

Handling End of Game 239

Chapter 10 Storing and Retrieving Game Information 245

Using Shared Preferences for Data Storage 246

Using XML for Data Storage 249

Using a SQLite Database for Data Storage 253

Part V Managing Your Game in the Market 261

Chapter 11 Making Money with Your Game 263

Knowing Your Competition 263

Monetization Models 269

Free 269

Paid 270

Free-to-Paid 272

Ad-based 274

In-app Purchases 275

Alternatives to Google Play 276

Chapter 12 Publishing and Updating Your Game 277

Creating a developer account for Google Play 277

Generating a Key with Keytool 278

Exporting a Signed Application 279

Uploading Your Game to Google Play 282

Uploading the APK 283

Adding product details 284

Supporting and Updating Your Game After Publication 292

Part VI The Part of Tens 295

Chapter 13 Ten Open-Source Game Projects 297

Lunar Lander 297

Replica Island 299

Alien Blood Bath 299

OpenSudoku 300

Lexic 301

Newton's Cradle 302

Vector Pinball 303

asqare 303

tiltmazes 304

GL ES Quake 305

Chapter 14 Ten Game Engines and Tools 307

libgdx 308

AndEngine 309

Unity 309

OpenFeint 310

Flurry 310

Audacity 311

sfxr 312

GIMP 313

Inkscape 314

AdWhirl 314

Chapter 15 Ten More Places to Distribute Your Game 317

Amazon 318

Handango 319

Opera Mobile App Store 320

GetJar 321

SlideME 322

Appoke 323

AppBrain 324

AndroLib 325

Your Website 326

BitTorrent Sites 326

Chapter 16 Ten Websites for Android Game Developers 327

Stack Overflow 328

Android Developer 329 330

Android Developers Blog 331

Appolicious 332

Android Tapp 333

Phandroid 334

xda developers 335

Droid Gamers 336

Android and Me 337

Glossary 339

Index 343

Read More Show Less

Customer Reviews

Average Rating 5
( 1 )
Rating Distribution

5 Star


4 Star


3 Star


2 Star


1 Star


Your Rating:

Your Name: Create a Pen Name or

Barnes & Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation


  • - By submitting a review, you grant to Barnes & and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Terms of Use.
  • - Barnes & reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing 1 Customer Reviews
  • Anonymous

    Posted September 7, 2013

    No text was provided for this review.

Sort by: Showing 1 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)