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

Game Theory


If you observe a game carefully in its source code level, you will observe that a game is just a set of illusions to create certain effects and display them on screen. Perhaps, the best example of this can be the game that we are about to develop. In order to make your character move ahead, you can do either of two things:

  • Make the character move ahead
  • Make the background move behind

Let's take a look at this in a bit more detail. The preceding two points can be achieved with the help of some illusions; let's understand how.

Illusions

Either of the two things mentioned in the preceding section will give you an illusion that the character is moving in a certain direction. Also, if you remember Mario properly, then you will notice that the clouds and grasses are one and the same, only their colors were changed. This was because of the memory limitations of the console platform at the time:

Game developers use many such tricks in order to get their game running. Of course, in today's...