Ted Hagos, Mario Zechner, J. F. DiMarzio and Robert Green

Beginning Android Games Development

From Beginner to Pro

4th ed.
Ted Hagos
Makati, Philippines
Mario Zechner
Graz, Steiermark, Austria
J. F. DiMarzio
Kissimmee, FL, USA
Robert Green
Portland, OR, USA
ISBN 978-1-4842-6120-0e-ISBN 978-1-4842-6121-7
© Ted Hagos, Mario Zechner, J.F. DiMarzio and Robert Green 2020
Standard Apress
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights.
The publisher, the authors and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, express or implied, with respect to the material contained herein or for any errors or omissions that may have been made. The publisher remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Distributed to the book trade worldwide by Springer Science+Business Media New York, 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail [email protected], or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation.

For Adrianne and Stephanie.

Introduction

Welcome to Beginning Android Games Development. This book will help you get started in your game programming journey with the little green robot.

Who this book is for

The book is aimed at beginner game programmers, but not quite that new to Android (nor Java). If you’re an applications programmer who has some experience with Java and wants to get into Android game programming, this book is perfect for you. While we assumed you have some experience with Android programming, we’ve devoted some chapters for those who are completely new to Android.

If you have a passing knowledge of Java and a bit of Android programming, you should be fine. If you’re new to both, there are plenty of Apress books on Java and Android introduction.

Chapter overview

Chapter 1 —This chapter is about the setup and configuration of Android Studio, the tool we’ll be using throughout the book for game development. If you’re already using this and are quite familiar with the tool, you can safely skip this chapter.

Chapter 2 —This chapter walks through how a basic project is created, set up, and compiled in Android Studio. It also discusses how to set up an emulator, which you will need when you test your app.

Chapter 3 —This chapter is about the IDE. Android Studio is a full-featured IDE; it’s got a lot of parts. This is a good chapter to read if you need to familiarize yourself with Android Studio. In the chapters where we actually build the game, I’ll be making some references to various parts of the IDE, for example, the Project tool window, Attributes window, Logcat, and so on.

Chapter 4 —Programming for the Android platform is not the same as programming for the desktop or the Web; in fact, even if you come from an iOS background, the Android platform may still feel foreign to you. This chapter gives an overview of the platform and how it is structured architecturally. It’s not an extensive introduction to Android components, but it talks about the components that we will need for our games.

Chapter 5 —It’s a quick tour on game genres and a short overview on how most games are structured logically. If you’re new to game programming, I suggest don’t skip this chapter. It might give you ideas for your next game.

Chapter 6 —This is the chapter where we build the first game. It’s a card game called Crazy Eights; you might have played it in the past. This is a long chapter. It’s best to download the source code for the game, then keep it open in Android Studio while you’re reading through the chapter. That, I think, is the best way to get the most out of it. We will build a turn-based card game, and we’re to handle most of the graphics ourselves; we won’t use built-in Android View objects, so it’s quite a chore—but it’s a good learning experience on how to move around in Android graphics.

Chapter 7 —In this chapter, we build another game called Pop Balloons. The game has simpler mechanics than Crazy Eights. The player basically just pops balloons as they float to the top of the screen. You’ll be introduced to built-in Animator objects in the Android SDK, for example, ValueAnimator, and how to use it as a timing engine. We’ll also use audio and sound effects in this chapter.

Chapter 8 —This chapter introduces some techniques on how to do testing in Android Studio and what kind of testing you can apply for game apps.

Chapter 9 —This chapter provides an easy-to-understand introduction to OpenGL ES. It includes a small exercise on how to draw something in 3D space.

Chapter 10 —This chapter talks about options on how to monetize your game app. It’s not a how-to chapter, but it provides a high-level discussion on the possible routes on how to get paid if you’re a game programmer.

Chapter 11 —When you’re ready to distribute your app, you’ll need to sign it and list it in a marketplace like Google Play. This chapter walks you through the steps on how to do it.

Chapter 12 —This chapter talks about some areas of interest that you can add to your game programming arsenal.

Table of Contents
Index 357
About the Authors
Ted Hagos

is a software developer by trade. At the moment, he’s Chief Technology Officer and Data Protection Officer of RenditionDigital International, a software development company based out of Dublin. He wore many hats in his 20+ years in software development, for example, team lead, project manager, architect, and director for development. He also spent time as a trainer for IBM Advanced Career Education, Ateneo ITI, and Asia Pacific College.

 
Mario Zechner

runs Badlogic Games, a game development shop focused on Android.

 
J. F. DiMarzio

is a seasoned Android developer and author. He began developing games in Basic on the TRS-80 Color Computer II in 1984. Since then, he has worked in the technology departments of companies such as the US Department of Defense and The Walt Disney Company. He has been developing on the Android platform since the beta release of version .03, and he has published two professional applications and one game on the Android marketplace. He is also an accomplished author. Over the last 10 years, he has released eight books, including Android: A Programmer’s Guide. His books have been translated into four languages and published worldwide. His writing style is very easy to read and understand, which makes the information on the topics that he presents more retainable.

 
Robert Green

is a mobile video game developer from Portland, Oregon, who develops and publishes mobile games under the brand Battery Powered Games. He has developed over a dozen mobile games and graphically interactive apps for himself and clients in the last two years, which include 2D and 3D action, puzzle, racing, and casual games. Before diving full time into video game development, he worked for software companies in Minneapolis, Minnesota, and Chicago, Illinois, including IBM Interactive. His current focus is on cross-platform game development and high-performance mobile gaming.

 
About the Technical Reviewer
Nishant Srivastava
../images/340874_4_En_BookFrontmatter_Figb_HTML.jpg
is primarily an Android Engineer, but also has experience writing firmware code for custom wearable hardware, building mobile SDKs for enabling DSP on Android, and constantly contributing to the community by giving talks, writing blog posts, coauthoring books, and so on. He is a listed inventor on two patents for using mobile tech in the cross-device mobile ad retargeting domain.

You can find more about him at www.nisrulz.com .

 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.47.59