Book Image

Mastering Android Game Development with Unity

By : Siddharth Shekar
Book Image

Mastering Android Game Development with Unity

By: Siddharth Shekar

Overview of this book

Game engines such as Unity are the power-tools behind the games we know and love. Unity is one of the most widely-used and best loved packages for game development and is used by everyone, from hobbyists to large studios, to create games and interactive experiences for the Web, desktop, mobile, and console. With Unity's intuitive, easy-to-learn toolset and this book, it's never been easier to become a game developer. You will begin with the basic concepts of Android game development, a brief history of Android games, the building blocks of Android games in Unity 5, and the basic flow of games. You will configure an empty project for the Jetpack Joyride Clone Game, add an environment and characters, and control them. Next you will walk through topics such as particle systems, camera management, prefabs, animations, triggers, colliders, and basic GUI systems. You will then cover the basic setup for 3D action fighting games, importing models, textures and controlling them with a virtual on-screen joystick. Later you will set up Scene for 3D Configuration, create basic gameplays, and manage input controls. Next you will learn to create the interface for the main menu, gameplay, game over, achievements, and high score screens. Finally you will polish your game with stats, sounds, and Social Networking, followed by testing the game on Android devices and then publishing it on Google Play, Amazon, and OUYA Stores.
Table of Contents (15 chapters)
Title Page
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Customer Feedback
Preface

Perky Penguin game


This section is all about the game which we will create throughout this chapter and Chapter 2, Finishing the Perky Penguin 2D Game. Our game name is Perky Penguin and it is a Jetpack Joyride-based game. Final game of this chapter is shown as following:

Figure 1.34 Perky Penguin Gameplay

Perky Penguin is inspired from Jetpack Joyride game. Jetpack Joyride is a 2011 side-scrolling endless runner and action video game created by Halfbrick Studios. It was originally released in 2011 for iOS devices on App Store but it has been ported to many systems including Facebook, Android, Flash, PlayStation, Blackberry, and Windows Phone.

Note

Jetpack Joyride game was titled Machine Gun Jetpack during development.

The reason to create a Jetpack Joyride type game for this book is to teach the developers the perspective and methods of how 2D games are created in Unity from scratch. As Jetpack Joyride game includes all the basic functionalities which are implemented almost in all types of 2D games such as side scrolling, parallax scrolling, sprite sheets, jumping, random obstacle generation, enemy generation, enemy Artificial Intelligence, particle systems, and animations.

Perky Penguin gameplay

The game features a penguin that is on ice in very cool (pun intended) and that's why she is called penguin. In order to navigate through an ice field in the time of global warming, she gets a hold of a jetpack, which is tied on her back. The game uses a simple, one-touch system to control the penguin; when the player presses anywhere on the touchscreen, the penguin's jetpack is fired and penguin rises above the ground making a feel like she is flying for a moment. When the player lets go, the jetpack turns off and penguin falls. The game is continuously running in side view, so player is not required to control the speed of penguin. The player is only able to control the vertical movement of penguin by turning the jetpack on and off.

The objective of the game is to travel as far as possible, collect fish coins, and avoid obstacles such as zappers, missiles, and high-intensity laser beams.

In the next section, we will start the development of the Perky Penguin game. We will learn how to add the player, which in our case is a penguin with jetpack tied to her back, to the game.