Unity Android Game Development by Example Beginner's Guide

Book description

Absolute beginners to designing games for Android will find this book is their passport to quick results. Lots of handholding and practical exercises using Unity 3D makes learning a breeze.

  • Enter the increasingly popular mobile market and create games using Unity 3D and Android
  • Learn optimization techniques for efficient mobile games
  • Clear, step-by-step instructions for creating a complete mobile game experience

In Detail

Powerful and continuing to grow, the mobile market has never been bigger and more demanding of great games. Android continues to prove itself as a strong contender in this challenging market. With Unity 3D, great games can be made for Android quickly and easily. With its great deployment system, the Android platform is now only one click away.

Unity Android Game Development by Example Beginner's Guide dives straight into making real, fully-functional games, with hands-on examples and step-by-step instructions to give you a firm grounding in Unity 3D and Android. Everything necessary for creating a complete gaming experience is covered and detailed throughout the course of this book.

Using clear and practical examples that progressively build upon each other, this book guides you through the process of creating games in Unity for Android.

Start by learning about all the great features that Unity and Android have to offer. Next, create a Tic-Tac-Toe game while learning all about interfaces. After that, learn about meshes, materials, and animations with the creation of a tank battle game. You will then learn how to expand your game's environment with the addition of shadows and a skybox. Adding on this, you will also learn how to expand the tank battle by creating enemies and using path finding to chase the player. Next, explore touch and tilt controls with the creation of a space fighter game. Then, learn about physics while recreating the most popular mobile game on the market. You will then expand the space fighter game with the addition of all the special effects that make a game great. Finally, complete your experience by learning the optimization techniques required to keep your games running smoothly.

While Unity is available for both Mac and Windows, the book is presented working from a Windows environment. Programming in Unity is possible in C#, JavaScript, and Boo. This book will be working in C# and the final projects will be provided in C# and JavaScript.

From nothing to a fully-featured mobile game, Unity Android Game Development by Example Beginner's Guide takes you through everything it takes to create your next game for the Android platform.

Table of contents

  1. Unity Android Game Development by Example Beginner's Guide
    1. Table of Contents
    2. Unity Android Game Development by Example Beginner's Guide
    3. Credits
    4. About the Author
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers and more
        1. Why Subscribe?
        2. Free Access for Packt account holders
    7. 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
    8. 1. Saying Hello to Unity and Android
      1. Understanding what makes Unity great
      2. Understanding what makes Android great
      3. Understanding how Unity and Android work together
      4. Differences between Pro and Basic
        1. License comparison overview
      5. Setting up the development environment
      6. Time for action – installing the JDK
        1. What just happened?
      7. Time for action – installing the Android SDK
        1. What just happened?
      8. Time for action – installing Unity 3D
        1. What just happened?
      9. Optional code editor
      10. Connecting to a device
      11. Time for action – simple device connection
        1. What just happened?
      12. Time for action – connecting trickier devices
        1. What just happened?
      13. Unity Remote
      14. Building a simple application
      15. Time for action – Hello World
        1. What just happened?
        2. Have a go hero – working ahead
      16. Summary
    9. 2. Looking Good – Graphical Interface
      1. Creating a Tic-tac-toe game
      2. Time for action – creating Tic-tac-toe
        1. What just happened?
      3. Finishing the game
      4. Time for action – finish creating the game
        1. What just happened?
      5. GUI Skins and GUI Styles
      6. A prettier form of Tic-tac-toe
      7. Time for action – styling the game
        1. What just happened?
        2. Have a go hero – backgrounds
      8. Dynamic positioning
      9. Time for action – the dynamic GUI
        1. What just happened?
        2. Have a go hero – scaling menus
      10. A better way to build to device
      11. Time for action – build and run
        1. What just happened?
        2. Have a go hero – single player mode
      12. Summary
    10. 3. The Backbone of Any Game – Meshes, Materials, and Animations
      1. Setting up
      2. Time for action – the setup
        1. What just happened?
      3. Importing the meshes
      4. Time for action – importing the tank
        1. What just happened?
      5. Tank import settings
        1. Setting up the tank
      6. Time for action – creating the tank
        1. What just happened?
      7. Time for action – keeping score
        1. What just happened?
      8. Time for action – controlling the chassis
        1. What just happened?
      9. Time for action – controlling the turret
        1. What just happened?
      10. Time for action – putting the pieces together
        1. What just happened?
        2. Have a go hero – cannon alignment
      11. Creating the materials
      12. Time for action – creating the city
        1. What just happened?
        2. Have a go hero – decorating the city
      13. Time for action – moving treads
        1. What just happened?
        2. Have a go hero – turning with the treads
      14. Animations
        1. The target's animations
      15. Time for action – setting up target's animations
        1. What just happened?
        2. State machines
      16. Time for action – creating the target state machine
        1. What just happened?
      17. Time for action – scripting the target
        1. What just happened?
        2. Creating the prefab
      18. Time for action – creating the target
        1. What just happened?
        2. Have a go hero – more targets
      19. Ray tracing to shoot
      20. Time for action – simple shooting
        1. What just happened?
        2. Have a go hero – better GUI
      21. Summary
    11. 4. Setting the Stage – Camera Effects and Lighting
      1. The camera effects
        1. Skyboxes and distance fog
      2. Time for action – adding a skybox and distance fog
        1. What just happened?
        2. Target indicator
      3. Time for action – creating the pointer
        1. What just happened?
      4. Time for action – controlling the indicator
        1. What just happened?
      5. Time for action – working with a second camera
        1. What just happened?
        2. Have a go hero – adjusting the position
        3. Turbo boost
      6. Time for action – using the boost effect
        1. What just happened?
        2. Have a go hero – styling and control
      7. Lights
      8. Time for action – adding more lights
        1. What just happened?
        2. Lightmaps
      9. Time for action – creating a lightmap
        1. What just happened?
        2. Have a go hero – reason and speed
        3. Cookies
      10. Time for action – applying headlights
        1. What just happened?
        2. Have a go hero – adding a switch
      11. Blob shadow
      12. Time for action – a tank with a shadow
        1. What just happened?
        2. Have a go hero – making it square
      13. Summary
    12. 5. Getting Around – Pathfinding and AI
      1. Understanding AI and pathfinding
      2. The NavMesh
      3. Time for action – creating the NavMesh
        1. What just happened?
        2. Have a go hero – creating extra obstacles
      4. The NavMeshAgent component
      5. Time for action – creating the enemy
        1. What just happened?
      6. The chase
      7. Time for action – the player is over here
        1. What just happened?
      8. Time for action – chasing the player
        1. What just happened?
        2. Have a go hero – adding shadow
      9. Being attacked
      10. Time for action – getting ready to fire
        1. What just happened?
        2. Have a go hero – player feedback
      11. Attacking the enemy
      12. Time for action – giving it a weakness
        1. What just happened?
        2. Have a go hero – coloring the enemy
      13. Spawning
      14. Time for action – creating spawns
        1. What just happened?
        2. Have a go hero – two for one
        3. Pop Quiz – understanding enemies
      15. Summary
    13. 6. Specialties of the Mobile Device – Touch and Tilt
      1. Setting up
      2. Time for action – creating the project
        1. What just happened?
      3. Controlling with tilt
      4. Time for action – steering the space ship
        1. What just happened?
        2. Making things move in space
      5. Time for action – flying asteroids
        1. What just happened?
        2. Adding space collisions
      6. Time for action – adding collisions
        1. What just happened?
        2. Have a go hero – adding points
        3. Creating the enemy
      7. Time for action – adding an enemy ship
        1. What just happened?
        2. Have a go hero – skybox and fog
      8. Controlling with touch
      9. Time for action – touch to shoot
        1. What just happened?
        2. Have a go hero – healthy ships
        3. Spawning in space
      10. Time for action – creating a space spawn
        1. What just happened?
        2. Have a go hero – more to spawn and shoot
        3. Pop Quiz – understanding Android components
      11. Summary
    14. 7. Throwing Your Weight Around – Physics and a 2D Camera
      1. 2D games in a 3D world
      2. Time for action – preparing the world
        1. What just happened?
      3. Physics
        1. Building blocks
      4. Time for action – creating planks
        1. What just happened?
        2. Have a go hero – creating a stone block
        3. Physics materials
      5. Time for action – sliding and bouncing
        1. What just happened?
      6. Characters
        1. The enemy
      7. Time for action – creating the pigs
        1. What just happened?
        2. The ally
      8. Time for action – creating the red bird
        1. What just happened?
      9. Controls
        1. Attacking
      10. Time for action – creating the slingshot
        1. What just happened?
        2. Watching
      11. Time for action – controlling the camera
        1. What just happened?
        2. Have a go hero – more levels
      12. A better background
      13. Time for action – creating the parallax background
        1. What just happened?
        2. Have a go hero – dark of the night
      14. The flock variety
        1. The yellow bird
      15. Time for action – creating the yellow bird
        1. What just happened?
        2. The blue bird
      16. Time for action – creating the blue bird
        1. What just happened?
        2. Have a go hero – creating a rainbow bird
        3. The black bird
      17. Time for action – creating the black bird
        1. What just happened?
        2. Have a go hero – explosive blocks
      18. Level selection
      19. Time for action – creating the level selection
        1. What just happened?
        2. Have a go hero – adding some style
      20. Summary
    15. 8. Special Effects – Sound and Particles
      1. Understanding audio
        1. Import settings
        2. Audio Listener
        3. Audio Source
        4. Adding background music
      2. Time for action – adding background music
        1. What just happened?
        2. Have a go hero – setting some mood
        3. Creating an alarm system
      3. Time for action – warning the player
        1. What just happened?
        2. Have a go hero – differentiation
      4. Understanding particle systems
        1. Particle system settings
        2. Creating engine trails
      5. Time for action – adding engine trails
        1. What just happened?
        2. Have a go hero – more trails
      6. Putting it together
        1. Explosions
      7. Time for action – adding explosions
        1. What just happened?
        2. Have a go hero – more types of explosions
        3. Creating laser blasts
      8. Time for action – adding laser blasts
        1. What just happened?
        2. Have a go hero – more types of lasers
      9. Summary
    16. 9. Optimization
      1. Minimizing the application footprint
        1. Editor log
        2. Asset compression
          1. Models
          2. Model tab
          3. Rig tab
          4. Animations tab
          5. Textures
          6. Audio
        3. Player settings
          1. Rendering
          2. Optimization
      2. Tracking performance
        1. Editor statistics
        2. The Profiler
        3. Tracking script performance
      3. Time for action – tracking scripts
        1. What just happened?
      4. Minimizing lag
      5. Occlusion
      6. Time for action – occluding tanks
        1. What just happened?
        2. Points to remember
      7. Summary
    17. A. Pop Quiz Answers
      1. Chapter 5, Getting Around – Pathfinding and AI
        1. Pop quiz – understanding enemies
      2. Chapter 6, Specialties of the Mobile Device – Touch and Tilt
        1. Pop quiz – understanding Android components
    18. Index

Product information

  • Title: Unity Android Game Development by Example Beginner's Guide
  • Author(s): Thomas Finnegan
  • Release date: December 2013
  • Publisher(s): Packt Publishing
  • ISBN: 9781849692014