Getting Started with Unity


Getting Started with Unity
eBook: $16.99
Formats: PDF, PacktLib, ePub and Mobi formats
$9.99
save 41%!
Print + free eBook + free PacktLib access to the book: $51.98    Print cover: $34.99
$34.99
save 33%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
Author
Reviews
Support
Sample Chapters
  • Use basic AI techniques to bring your game to life
  • Learn how to use Mecanim; create states and manage them through scripting
  • Use scripting to manage the graphical interface, collisions, animations, persistent data, or transitions between scenes

Book Details

Language : English
Paperback : 170 pages [ 235mm x 191mm ]
Release Date : August 2013
ISBN : 1849695849
ISBN 13 : 9781849695848
Author(s) : Patrick Felicia
Topics and Technologies : All Books, Game Development

Table of Contents

Preface
Chapter 1: Getting to Know Unity3D
Chapter 2: Creating a Maze with Built-in Objects
Chapter 3: Using Scripts to Interact with Objects
Chapter 4: Creating and Tracking Objects
Chapter 5: Bringing Your Game to Life with AI and Animations
Chapter 6: Finalizing and Optimizing Your Game
Index
  • Chapter 1: Getting to Know Unity3D
    • Introduction to game engines
    • Why choose Unity
    • What's new in Unity3D 4
    • Downloading Unity3D
    • Launching Unity3D
    • Unity3D's interface
      • The Scene view
        • Navigating in the scene
      • The Hierarchy view
      • The Project view
      • The Inspector
      • The Console
    • Navigating through the AngryBots scene
    • Creating a new project and scene
    • Adding objects to a scene
      • Creating a cube
      • Adding a texture to objects
      • Inserting imported objects
    • Implementing first- and third-person views
      • Adding a first-person controller
      • Adding a third-person controller
    • Summary
          • Chapter 5: Bringing Your Game to Life with AI and Animations
            • Importing and configuring the 3D character
            • Animating the character for the game
            • Creating parameters and transitions
            • Adding basic AI to enemies
            • Sending messages to alert other close enemies
            • Creating additional states
            • Using waypoints to define a path
            • Summary
            • Chapter 6: Finalizing and Optimizing Your Game
              • Improving the AI using breadcrumbing
                • Allowing enemies to throw and follow their own breadcrumbs
                • Allowing enemies to follow the player's breadcrumbs
              • Creating and updating prefabs
              • Keeping track of the number of lives
              • Animating the door that leads to the water section
              • Creating a menu system for your game
              • Keeping track of the number of lives
              • Optimizing the game
              • Exporting your game to the web
              • Where to go from here
                • Game designing
                • Artificial intelligence
                • 3D characters
                • Creating your audio files
                • Learning more about Unity3D
              • Summary

              Patrick Felicia

              Patrick Felicia is a lecturer and researcher at Waterford Institute of Technology, where he teaches and supervises undergraduate and postgraduate students. He obtained his MSc in Multimedia Technology in 2003 and PhD in Computer Science in 2009 from University College Cork, Ireland. He has published several books and articles on the use of video games for educational purposes, including Handbook of Research on Improving Learning and Motivation through Educational Games: Multidisciplinary Approaches (published by IGI), and Digital games in schools: a handbook for teachers, published by European Schoolnet. Patrick is also the Editor-in-chief of the International Journal of Game-Based Learning (IJGBL), and the Conference Director of the Irish Symposium on Game-Based Learning, a popular conference on games and learning organized throughout Ireland.

              Code Downloads

              Download the code and support files for this book.


              Submit Errata

              Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


              Errata

              - 2 submitted: last submission 20 Nov 2013

              Errata type: Code | Page number: 124

               

              setCharacterType (canFollowPlayerCrumbs);
              Should be:
              setCharacterType (canFollowPlayersCrumbs);

               

              Errata type: Technical | Page number: 125

               

              In statement 4 of the previous code, we create an array that will include all of the breadcrumbs generated by this zombie.


              Should be:
              In statement 4 of the previous code, we create an array that will include all of the breadcrumbs generated by the player.

               

               

              Errata type: Code | Page number: 128


              On page 128, so that the player does not lose ammunitions when ammunitions have been collected before the gun,
              the code GetComponent(shootBullet).nbBullets = 40
              can be replaced by
              GetComponent(shootBullet).nbBullets += 40
              and the code:
              GameObject.FindWithTag("Player").GetComponent(shootBullet).nbBullets += 30;
              can be replaced by
              GetComponent(shootBullet).nbBullets += 30;

               

              Errata type: Code/ technical

              Before modifying the script to handle collision with the water on page 133, in the script "collisionDetection" , the following line
              if(c.gameObject.tag == "medpack" || c.gameObject.tag == "key" || c.gameObject.tag == "gun" ||
              c.gameObject.tag == "ammunitions")
              should be changed to:
              if(c.gameObject.tag == "medpack" || c.gameObject.tag == "key" || c.gameObject.tag == "gun" ||
              c.gameObject.tag == "ammunitions" || c.gameObject.tag == "water")

               

              Errata type: Technical

              Some users seem to encounter issues with state machines in chapter 5, whereby the character is in the IDLE mode in the Animator window, but the corresponding switch state in the script controlZombie is never accessed. This issue may or may not occur (same code may or may not work on different project/computers), but a workaround is to declare the different states in the script controlZombie as private variables (not public variables). For example, replace "public var walkForwardState : int" with "private var walkForwardState : int". This workaround seems to fix the issue until we know more about the causes.

              Sample chapters

              You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

              Frequently bought together

              Getting Started with Unity +    AJAX and PHP: Building Responsive Web Applications =
              50% Off
              the second eBook
              Price for both: €15.00

              Buy both these recommended eBooks together and get 50% off the cheapest eBook.

              What you will learn from this book

              • Understand the different layouts, windows, and shortcuts, and navigate through scenes
              • Use, combine, and transform built-in objects and components including textures, water, GUI elements, controllers, lights, particles, and shapes
              • Understand different types of colliders, individualize objects with tags, apply colliders, and manage collisions through scripting
              • Learn how to create scripts, understand and use the default functions, and employ the console for debugging purposes
              • Access and modify game objects’ properties through scripting
              • Create functions, pass and access variables, and call functions between scripts
              • Implement basic AI for path-finding or user detection
              • Load scenes, navigate through scenes, and create persistent objects across scenes

              In Detail

              Unity is a game development engine which is fully integrated with a complete set of intuitive tools and rapid workflows used to create interactive 3D content. Unity is best used for making great games that can deploy to numerous platforms.

              "Getting Started with Unity" guides you progressively through the necessary steps to create a survival game using Unity3D’s built-in objects and components, JavaScript, animations with Mecanim, and some basic AI.

              In this book, you will be introduced to a wide range of the core features used for games developed with Unity3D, including the user interface and much more. Furthermore, you will also learn about essential aspects like transformations, scripting, navigation, and built-in controllers.

              Beginning with an introduction to the user interface, you will learn the necessary skills required to create a survival video game. Each section is a stepping-stone toward the completion of the final game. By the end of the book, you will have created an indoor level with enemies, AI, weapons, objects to collect, and all the logic to control the game.

              Approach

              Getting Started with Unity is written in an easy-to-follow tutorial format.

              Who this book is for

              "Getting Started with Unity" is for 3D game developers who would like to learn how to use Unity3D and become familiar with its core features. This book is also suitable for intermediate users who would like to improve their skills. No prior knowledge of Unity3D is required.

              Code Download and Errata
              Packt Anytime, Anywhere
              Register Books
              Print Upgrades
              eBook Downloads
              Video Support
              Contact Us
              Awards Voting Nominations Previous Winners
              Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
              Resources
              Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software