Ted Hagos
Makati, Philippines
Mario Zechner
Graz, Steiermark, Austria
J. F. DiMarzio
Kissimmee, FL, USA
Robert Green
Portland, OR, USA
Any source code or other supplementary material referenced by the author in this book is available to readers on GitHub via the books product page, located at www.apress.com/978-1-4842-6120-0 . For more detailed information, please visit http://www.apress.com/source-code .
ISBN 978-1-4842-6120-0 e-ISBN 978-1-4842-6121-7
https://doi.org/10.1007/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 orders-ny@springer-sbm.com, 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.
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 youre 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, weve 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 youre new to both, there are plenty of Apress books on Java and Android introduction.
Chapter overview
Chapter This chapter is about the setup and configuration of Android Studio, the tool well be using throughout the book for game development. If youre already using this and are quite familiar with the tool, you can safely skip this chapter.
Chapter 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 This chapter is about the IDE. Android Studio is a full-featured IDE; its 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, Ill be making some references to various parts of the IDE, for example, the Project tool window, Attributes window, Logcat, and so on.
Chapter 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. Its not an extensive introduction to Android components, but it talks about the components that we will need for our games.
Chapter Its a quick tour on game genres and a short overview on how most games are structured logically. If youre new to game programming, I suggest dont skip this chapter. It might give you ideas for your next game.
Chapter This is the chapter where we build the first game. Its a card game called Crazy Eights; you might have played it in the past. This is a long chapter. Its best to download the source code for the game, then keep it open in Android Studio while youre 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 were to handle most of the graphics ourselves; we wont use built-in Android View objects, so its quite a chorebut its a good learning experience on how to move around in Android graphics.
Chapter 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. Youll be introduced to built-in Animator objects in the Android SDK, for example, ValueAnimator, and how to use it as a timing engine. Well also use audio and sound effects in this chapter.
Chapter 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 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 This chapter talks about options on how to monetize your game app. Its not a how-to chapter, but it provides a high-level discussion on the possible routes on how to get paid if youre a game programmer.
Chapter When youre ready to distribute your app, youll 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 This chapter talks about some areas of interest that you can add to your game programming arsenal.