Do you have an awesome idea for the next break-through mobile gaming title? This updated edition will help you kick-start your project as it guides you through the process of creating several example game apps using APIs available in Android. You will learn the basics needed to join the ranks of successful Android game app developers. the book starts with game design fundamentals using Canvas and Android SDK 10 or earlier programming basics. You then will progress toward creating your own basic game engine and playable game apps that work on Android 10 or earlier smartphones and tablets. You take your game through the chapters and topics in the book to learn different tools such as OpenGL ES. And you will learn about publishing and marketing your games to monetize your creation. **What You Will Learn** * Gain knowledge on the fundamentals of game programming in the context of Android * Use Android's APIs for graphics, audio, and user input to reflect those fundamentals * Develop two 2D games from scratch, based on Canvas API and OpenGL ES * Create a full-featured 3D game * Publish your games, get crash reports, and support your users * Complete your own playable 2D OpenGL games **Who This Book Is For** Those with basic knowledge of Java who want to write games on the Android platform, and experienced game developers who want to know about the pitfalls and peculiarities of the platform Table of Contents 5 About the Authors 10 About the Technical Reviewer 12 Introduction 13 Chapter 1: Setup 16 Installing Android Studio 17 Configure Android Studio 21 Hardware Acceleration 24 Key Takeaways 26 Chapter 2: Project Basics 27 Create a Project 27 Create an AVD 32 Key Takeaways 41 Chapter 3: Android Studio 43 The IDE 43 Main Editor 46 Editing Layout Files 47 Inserting TODO Items 50 How to get more Screen Space for Code 51 Preferences/Settings 56 Key Takeaways 58 Chapter 4: What’s in an Android Application 59 What makes up an Android Project 60 Application Entry Point 63 Activities 64 Intents 66 Key Takeaways 68 Chapter 5: Introduction to Game Development 69 A Quick Tour of Game Genres 70 Casual Games 70 Puzzle Games 72 Action Games 75 Tower Defense Games 76 Game Engine 77 Key Takeaways 79 Chapter 6: Building the Crazy Eights Game 80 Basic Gameplay 81 Key Parts of the Program 82 Custom Views and Activities 83 Drawing on the Screen 85 Handling Events 87 SplashScreen with a Title Graphic 90 Adding the Play Button 98 Launching the Game Screen 103 Starting the Game 108 Displaying the Cards 115 Handling Turns 120 Playing a Card 120 When there is no Valid Play 143 When it’s the Computer’s Turn 146 Ending a Hand 149 Chapter 7: Building the Balloon Popper Game 162 Game Mechanics 163 Creating the Project 164 Drawing the Background 165 Game Controls and Pin Icons 178 Drawing the Balloons 194 Making the Balloons Float 200 Launching the Balloons 207 Handling Game Levels 211 Pop the Balloons 215 Managing the Pins 220 When the Game is Over 222 Audio 227 Final Touches 236 Chapter 8: Testing and Debugging 247 Types of Game Testing 247 Unit Testing 250 JVM Test vs. Instrumented Test 251 A Simple Demo 252 Implementing the Test 256 Running a Unit Test 259 Debugging 261 Syntax Errors 262 Runtime Errors 263 Logic Errors 264 Walking through the Code 266 Profiler 268 CPU 270 Memory 274 Network 278 Energy 279 Key Takeaways 280 Chapter 9: Introduction to OpenGL ES 281 What’s OpenGL ES 282 What does OpenGL ES do 284 Models or Objects 286 Lights 287 Camera 287 Viewport 287 Projections 288 Matrices 288 Rendering a Simple Sphere 290 Key Takeaways 327 Chapter 10: Monetization 328 Paid or Free 328 Freemium 330 In-app Purchase 331 Virtual Currency 332 Advertising 332 Getting your Game Discovered 333 Social Network 333 Discovery Services 334 Blogs and Web Media 335 Game Design 335 Key Takeaways 337 Chapter 11: Publishing the Game 338 Prepare the Project for Release 338 Prepare Material and Assets for Release 339 Configure the App for Release 339 Build a Release-Ready Application 340 Releasing the App 346 Key Takeaways 350 Chapter 12: What’s Next 352 Android NDK 352 Vulkan 357 Game Engines and Frameworks 363 Frameworks 364 Engines 365 Key Takeaways 366 Index 367 Front Matter ....Pages i-xvii Setup (Ted Hagos, Mario Zechner, J. F. DiMarzio, Robert Green)....Pages 1-11 Project Basics (Ted Hagos, Mario Zechner, J. F. DiMarzio, Robert Green)....Pages 13-28 Android Studio (Ted Hagos, Mario Zechner, J. F. DiMarzio, Robert Green)....Pages 29-44 What’s in an Android Application (Ted Hagos, Mario Zechner, J. F. DiMarzio, Robert Green)....Pages 45-54 Introduction to Game Development (Ted Hagos, Mario Zechner, J. F. DiMarzio, Robert Green)....Pages 55-65 Building the Crazy Eights Game (Ted Hagos, Mario Zechner, J. F. DiMarzio, Robert Green)....Pages 67-148 Building the Balloon Popper Game (Ted Hagos, Mario Zechner, J. F. DiMarzio, Robert Green)....Pages 149-233 Testing and Debugging (Ted Hagos, Mario Zechner, J. F. DiMarzio, Robert Green)....Pages 235-268 Introduction to OpenGL ES (Ted Hagos, Mario Zechner, J. F. DiMarzio, Robert Green)....Pages 269-315 Monetization (Ted Hagos, Mario Zechner, J. F. DiMarzio, Robert Green)....Pages 317-326 Publishing the Game (Ted Hagos, Mario Zechner, J. F. DiMarzio, Robert Green)....Pages 327-340 What’s Next (Ted Hagos, Mario Zechner, J. F. DiMarzio, Robert Green)....Pages 341-355 Back Matter ....Pages 357-364 "Do you have an awesome idea for the next break-through mobile gaming title? This updated edition will help you kick-start your project as it guides you through the process of creating several example game apps using APIs available in Android. You will learn the basics needed to join the ranks of successful Android game app developers. The book starts with game design fundamentals using Canvas and Android SDK 10 or earlier programming basics. You then will progress toward creating your own basic game engine and playable game apps that work on Android 10 or earlier smartphones and tablets. You take your game through the chapters and topics in the book to learn different tools such as OpenGL ES. And you will learn about publishing and marketing your games to monetize your creation. You will: Gain knowledge on the fundamentals of game programming in the context of Android; Use Android's APIs for graphics, audio, and user input to reflect those fundamentals; Develop two 2D games from scratch, based on Canvas API and OpenGL ES; Create a full-featured 3D game; Publish your games, get crash reports, and support your users; Complete your own playable 2D OpenGL games."--Publisher's description