Book Image

Unity Android Game Development by Example Beginner's Guide

By : Thomas James Finnegan
Book Image

Unity Android Game Development by Example Beginner's Guide

By: Thomas James Finnegan

Overview of this book

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 (17 chapters)
Unity Android Game Development by Example Beginner's Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Time for action – installing Unity 3D


Perhaps the most important part of this whole book, without which none of the rest has meaning, is installing Unity.

  1. The latest version of Unity can be found at http://www.unity3d.com/unity/download. As of the time of writing this, the current version is 4.2.2.

  2. Once downloaded, launch the installer and click Next until you reach the Choose Components page.

  3. Here, we are able to select the features of Unity installation. None of these options are actually necessary for following the rest of this book, but they warrant having a look at since Unity will ask every time you update or reinstall it.

    • The Example Project is the current project built by Unity to show off some of its latest features. If you want to jump in early and take a look at what a complete Unity game looks like, leave this checked.

    • The Unity Development Web Player is required if you plan on developing browser applications with Unity. As this book is focused on Android development, it is entirely optional. It is, however, a good one to check. You never know when you may need a web demo and since it is entirely free to develop for the web using Unity, there is no harm in having it.

    • The last option is MonoDevelop. It is a wise choice to leave this option unchecked. There is more detail in the next section, but it will suffice for now to say that it just adds an extra program for script editing that is not nearly as useful as it should be.

  4. Once you have selected or deselected your desired options, hit Next. If you wish to follow the book exactly, we will be unchecking MonoDevelop and leaving the rest checked.

  5. Next is the install location. The default location works well, so hit Install and wait. This will take a couple of minutes, so sit back, relax, and enjoy your favorite beverage.

  6. Once the installation is complete, the option to run Unity will be displayed. Leave it checked and hit Finish. If you have never installed Unity before, you will be presented with a license activation page.

  7. While Unity does provide a feature–rich, free version, in order to follow the entirety of this book, one requires to make use of some of the Unity Pro features. At https://store.unity3d.com you have the ability to buy a variety of licenses. To follow the whole book, you will at least need to purchase Unity Pro and Android Pro licenses. Once purchased, you will receive an e-mail containing your new license key. Enter that in the provided text field.

  8. If you are not ready to make a purchase, you have two alternatives. We will go over how to reset your license in the Building a simple application section later in the chapter.

    • The first alternative is that you can check the Activate the free version of Unity checkbox. This will allow you to use the free version of Unity. As discussed earlier, there are many reasons to choose this option. The most notable at the moment is cost.

    • Alternatively, you can select the Activate a free 30-day trial of Unity Pro option. Unity offers a fully functioning, one-time installation, and free 30-day trial of Unity Pro. This trial also includes the Android Pro add-on. Anything produced during those 30 days is completely yours, just as if you had purchased a full Unity Pro license. They want you to see how great it is, so you will come back and make a purchase. The downside is the Trial Version watermark that will be constantly displayed in the corner of the game. After the 30 days, Unity will revert to the free version. This is a great option, should you choose to wait before making a purchase.

  9. Whatever your choice is, hit OK once you have made it.

  10. The next page simply asks you to log in with your Unity account. This will be the same account you used to make your purchase. Just fill out the fields and hit OK.

  11. If you have not yet made a purchase, you can hit Create Account and have it ready to go when you do make a purchase.

  12. The next page is a short survey on your development interests. Fill it out and hit OK or scroll straight to the bottom and hit Not right now.

  13. Finally there is a thank you page. Hit Start using Unity.

  14. After a short initialization, the project wizard will open and we can start creating the next great game. However, there is still a bunch of work to do: in connecting the development device. So, for now, hit the X button in the top-right corner to close the project wizard. We will cover how to create a new project in the Building a simple application section later on.

What just happened?

We just installed Unity 3D. The whole book relies on this step. We also had to make a choice about licenses. If you chose to purchase the Pro version, you will be able to follow everything in this book without issues. The alternatives, though, will have a few shortcomings. You will either not have full access to all of the features or be limited to the length of the trial.