- Full Description
Beginning 3D Game Development with Unity is perfect for those who would like to come to grips with programming Unity. You may be an artist who has learned 3D tools such as 3ds Max, Maya, or Cinema 4D, or you may come from 2D tools such as Photoshop and Illustrator. On the other hand, you may just want to familiarize yourself with programming games and the latest ideas in game production.
This book introduces key game production concepts in an artist-friendly way, and rapidly teaches the basic scripting skills you'll need with Unity. It goes on to show how you, as an independent game artist, can create casual interactive adventure games in the style of Telltale's Tales of Monkey Island, while also giving you a firm foundation in game logic and design.
- The first part of the book explains the logic involved in game interaction, and soon has you creating game assets through simple examples that you can build upon and gradually expand.
- In the second part, you'll build the foundations of a point-and-click style first-person adventure gameincluding reusable state management scripts, load/save functionality, a robust inventory system, and a bonus feature: a dynamically configured maze and mini-map.
- With the help of the provided 2D and 3D content, you'll learn to evaluate and deal with challenges in bite-sized pieces as the project progresses, gaining valuable problem-solving skills in interactive design.
What youll learn
- How to build interactive games that work on a variety of platforms
- Take the tour around Unity user interface fundamentals, scripting and more
- Create a test environment and gain control over functionality, cursor control, action objects, state management, object metadata, message text and more
- What is inventory logic and how to manage it
- How to handle 3D object visibility, effects and other special cases
- How to handle variety of menus and levels in your games development
- How to handle characters, scrollers, and more
- How to create or integrate a story/walkthrough
Who this book is for
Students or artists familiar with tools such as 3ds Max or Maya who want to create games for mobile platforms, computers, or consoles, but with little or no experience in scripting or the logic behind games development.
- Table of Contents
Table of Contents
- Exploring the Genre
- Unity UIBasics and Getting Started
- ScriptingGetting your Feet Wet
- Terrain GenerationCreating a Test Environment
- Navigation and Introduction to Functionality
- Cursor Control
- Action Objects
- Managing State
- Object Metadata
- Message Text
- Inventory Logic
- Managing the Inventory
- Finishing the Basic Functionality
- Getting Down to the Game
- Maze and Final Sequence
- Menus and Levels
- Beyond the Basics
- Appendix A: Shader Graphs
- Appendix B: Keyboard Key Names
- Appendix C: Final Sequence Outline
- Source Code/Downloads
If you think that you've found an error in this book, please let us know by emailing to firstname.lastname@example.org . You will find any confirmed erratum below, so you can check if your concern has already been addressed.On page 102:
Text states that backslashes are to be used to comment out code but forward slashes are used.
On page 250-251:
E-book Version Page 251
Code starts at step 10. Previous page is the first page of the chapter. no code involved on first page.
Missing pages that list code steps 1 - 9.
had to pull the code from the source code download, but i don't know the changes made in the UI that are not code.
On page 300-308:The final portions of this exercise do not function properly in Unity 3.42.
Even when utilizing the author's source code, the Interactor script generates the following compiler error.
"Assets/Adventure Scripts/Interactor.js(47,53): BCE0120: 'GameManager.navigating' is inaccessible due to its protection level."
On page 308:In step 5., when you enter this line of code in the Interactor script:
if (controlCenter.getComponent(GameManager).navigating) return;
and then try to run the game, you will get this error:
Assets/Adventure Scripts/Interactor.js(47,53): BCE0120: 'GameManager.navigating' is inaccessible due to its protection level.
To fix the error, in the GameManager script, remove "private" from the variable so that the line now reads:
var navigating : boolean; // flag for navigation state
On page 414:
Page 414, paragraph 2, sentence 3 reads:
In going from state zero (unlocked)...
It should say:
In going from state zero (locked)...
On page 430:On page 430, steps 5 - 7 are rather unclear and confusing, especially to those that are new to Unity and possibly scripting in general.
First, in the text, one of the pieces of data to be added is written as "Key Icon", including the space in-between the words, yet in figure 8-13 it is shown as "Icon_Key". Which is it?
Second, in step 7, several operations are condensed down into a list, which would normally be okay, except this is the first introduction to using an array in Unity and it should have been broken down into smaller steps. This is made all the more confusing by the structure of the sentence used to convey the instructions.
The sentence starts with "Set the other two arrays to Size 1 and fill in their data...", which makes sense, since we have already filled in the data for the first array in a previous step. The problem is that the following list also provides the data for the first array, which still wouldn't be all that confusing in itself except that it is labeled as State 0:, State 0:, State 1:, State 2:. None of these "states" are actual labels in the arrays. It is up to the reader to deduce what these mean and where to put what, and while this may be obvious to someone with experience, it most likely is not to the beginner.
It would have been much better if the list were written as:
Lookup State 0:
element 0: default,0
element 1: Icon_Key,1,KeyAtLock,1,Icon_Key,0
Lookup State 1:
element 0: default,0,KeyAtLock,0,Icon_Key,2
Lookup State 2:
element 0: default,2
This would follow the actual layout and syntax of the inspector much better. About the only way for the reader to figure this out in its current state is by comparing what's written to figure 8-13, which is actually another compounding factor in the confusion, because the screenshot in the book is almost illegible. Even with a magnifying glass it's a low-res grayscale image and difficult to figure out.
On page 462:The first sentence in paragraph 3 states:
"In the Textures folder provided as part of this book's download, you will see a texture called MyBox."
The texture is actually found here:
On page 472:If the readers works through the tutorials up to step 5 and then tests, they will get the following error:
"...'GameManager.longDesc' is inaccessible due to its protection level."
This is because, as of Unity 3.4, variables set in scripts that are accessed by other scripts can no longer be set to private.
To fix this and a related error, open the GameManager script and change:
private var shortDesc : String = "";
private var longDesc : String = "";
var shortDesc : String = "";
var longDesc : String = "";
On page 473:In the metadata table for the Pedestal, Element0 in "Description" says:
"it is an extremely ugly stone"
This should actually say something about the pedestal. entering it as shown won't cause any problems but could possibly be confusing if you are testing.
On page 474:In step 13, instead of entering:
private var inRange : boolean;
var inRange : boolean;
Otherwise, as of Unity 3.4, you will get the error:
'GameManager.inRange' is inaccessible due to its protection level.
On page 475:As of Unity 3.4, all variables set in a script that are accessed by another script must be public. Otherwise you will get the error, "... is inaccessible due to its protection level."
In the CustomCursor script, change the line:
private var currentCursor : Texture;
var currentCursor : Texture;
This will resolve the error.
On page 943, 944:In Appendix B: Key Codes, many of these are incorrect.
For instance: all codes for the keypad are listed as "keypad1", "keypad2", etc.
These actually have to be the character surrounded by square brackets: "", "", etc. Inputing them as listed in the book will result in Unity rejecting it.
The list of codes can be found in the "Input" section of the Unity manual, but as is the case with most Unity docs, the list is incomplete, but it does at least provide the basic format for all special keys.