O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Mastering Android Game Development with Unity

Book Description

Create enthralling Android games with Unity Faster Than Ever Before

About This Book

  • Develop complex Android games with the help of Unity's advanced features such as artificial intelligence, high-end physics, and GUI transformations.
  • Create amazing Graphical User Interfaces (GUIs) with Unity's new uGUI system
  • Unravel and deploy exciting games across Android devices

Who This Book Is For

If you are a Unity 5 developer and want to expand your knowledge of Unity 5 to create high-end complex Android games, then this book is for you. Readers are expected to have a basic understanding of Unity 5, working with its environment, and its basic concepts.

What You Will Learn

  • Develop your own Jetpack Joyride clone game
  • Explore the advanced features of Unity 5 by building your own Action Fighting game
  • Develop remarkable Graphical User Interfaces (GUIs) with Unity's new uGUI system
  • Enhance your game by adding stunning particle systems and complex animations
  • Build pleasing virtual worlds with special effects, lights, sky cube maps, and cameras
  • Make your game more realistic by providing music and sound effects
  • Debug and deploy your games on different Android devices

In Detail

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.

Style and approach

A step-by-step and detailed guide to developing high-end complex Android games utilizing the advanced concepts of Unity.

Table of Contents

  1. Preface
    1. What this book covers
    2. What you need for this book
    3. Who this book is for
    4. Conventions
    5. Reader feedback
    6. Customer support
      1. Downloading the example code
      2. Downloading the color images of this book
      3. Errata
      4. Piracy
      5. Questions
  2. Introduction to Android Game Development with Unity3D
    1. Introduction to Android
      1. Android versions
      2. Google Play - the market store for Android
    2. Unity3D and game engines
      1. Unreal Engine
      2. Adobe Flash professional
      3. Game Maker Studio
      4. Unity3D
    3. Features of Unity3D
    4. Basics of Unity game development
      1. Unity editor interface
        1. Scene View
          1. Transform tools
          2. Scene View navigation
          3. Scene View control bar
        2. Game View
          1. Game View control bar
        3. Hierarchy View
        4. Project browser panel
        5. Inspector panel
    5. Configuration of empty game projects
    6. Perky Penguin game
      1. Perky Penguin gameplay
    7. Adding the penguin
      1. Importing the penguin Sprite
      2. Creating penguin game object
      3. Adding script behavior on penguin object
      4. Limiting the penguin between screen bounds
    8. Summary
  3. Finishing the Perky Penguin 2D Game
    1. Adding Particle Systems
      1. What is a Particle System?
      2. Basics of Particle System
      3. Creating a rocket fire Particle Effect for a game
      4. Adding game-level backgrounds
    2. Camera management
      1. Making the penguin move forward
      2. Making the camera follow the Penguin
    3. Prefabs and level management
      1. Prefabs
      2. Creating a Level Block Prefab
      3. The level block generator concept
      4. The BlockGenerator.cs code
      5. Adding ice spikes to the game
    4. Summary
  4. Adding Player Character for an Action Fighting Game
    1. Configuring Project for 3D Games in Unity
    2. Importing 3D models
      1. 3D models
      2. Modelling tools
      3. Importing 3D models in Unity3D
      4. Importing FBX Model
    3. Applying textures and materials
      1. Textures
        1. Texture Importer
        2. Applying texture in shaders
      2. Shaders
      3. Materials
      4. Applying textures on a farmhouse model
    4. Generic and humanoid rigs
      1. What are humanoid characters?
      2. Importing humanoid models
      3. Configuring the avatar of humanoid models
    5. Humanoid animation using Unity
      1. Legacy Animation System
      2. Mecanim animation system
    6. Creating layer character for the fighting game
    7. Summary
  5. Enemy Characters with AI
    1. Importing the player model
    2. Player Animation Controller
    3. Scripting player controls
    4. Adding an enemy character
    5. Enemy behavior and AI
    6. Finalizing the fight
    7. Summary
  6. Gameplay, UI, and Effects
    1. Finishing up gameplay
    2. Understanding Unity uGUI
    3. Adding GUI for health and gameover
    4. Introduction to Particle Effects
    5. Creating confetti Particle Effect
    6. Summary
  7. GameScene and SceneFlow
    1. Adding buttons to the startScene
    2. Organizing the folder structure
    3. Adding a game restart button in the startScene
    4. Adding a pause button to the startScene
    5. Adding a main menu button to the startScene
    6. Creating MainMenu scene
    7. Summary
  8. Gamestats, Social, IAP, and Ad Integration
    1. Running the app on the device/ emulator
    2. Android Developer Console
    3. Adding achievements in the game
    4. Saving game stats
    5. Ad integration
    6. In-App purchasing
    7. Adding social media integration
    8. Summary
  9. Sound, Finishing Touches, and Publishing
    1. Adding sound
    2. Handling multiple resolutions
    3. Optimizing the APK
    4. Preparing the build for publishing
    5. Publishing the game
    6. Summary