Book Image

Learning Android Game Development

By : Nikhil Malankar
Book Image

Learning Android Game Development

By: Nikhil Malankar

Overview of this book

In this book, we’ll start with installing Android studio and its components, and setting it up ready for Android N. We teach you how to take inputs from users, create images and interact with them, and work with sprites to create animations. You’ll then explore the various collision detection methods and use sprites to create an explosion. Moving on, you’ll go through the process of UI creation and see how to create buttons as well as display the score and other parameters on screen. By the end of the book, you will have a working example and an understanding of a 2D platform game like Super Mario and know how to convert your 2D games to 3D games.
Table of Contents (17 chapters)
Title Page
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
4
Creating Sprites and Interactive Objects

Creating a 3D scene with OpenGL ES


Just as we did in our 2D game example, most of our draw mechanism is going to remain the same. You will see that there are many similarities between both procedures. We will be working on a new project folder for this example, so let's go ahead and create a new project as we did in Chapter 8, Adding Explosion and Creating a UI.

Creating our project folder

We will follow the steps we did in Chapter 2, Getting Familiar with Android Studio. First, we will create a new project from our top menu.

To create a new project, perform the following steps:

  1. Go to FileNewNew Project..., as shown in the following screenshot:
  1. Fill in your Application name, Company domain, and Package name details; then click on Next:
  1. Select your target devices and click on Next:
  1. Select Empty Activity and click on Next:
  1. Fill in your Activity NameLayout Name, and click on Finish:

Okay then, we are now set with our new project folder. Also, we will use the landscape mode orientation for this...