Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Beginning 3D Game Development with Unity

Discussion in 'Community Learning & Teaching' started by k3D-Junkie, Jun 20, 2011.

  1. k3D-Junkie

    k3D-Junkie

    Joined:
    Jun 14, 2011
    Posts:
    236
    Hi all,

    I just wanted to introduce myself and, following in the tradition started by Will and Ryan, start a thread for my new book in case you all have questions, comments or just want to chat.

    My name is Sue Blackman and I've written this book, Beginning 3D Game Development with Unity (Apress, publishers), especially for artists and designers and those of you who are new to scripting and game development in general. It starts with concepts and terms related to not only 3D, but the differences between realtime and traditional 3D for media.

    The book is project based and takes you through the process of creating a classic first person adventure game- a genre that is very forgiving and well suited to beginning scripting. Even if adventure games aren't your final goal, you will be able to get a handle on the concepts and implementation of game logic, state management, inventory, saving/loading and other in-depth topics useful in many other types of games. The approach is to start small and add functionality a little bit time with plenty of visual feedback for your scripting efforts.

    Finally, the book comes with lots of art assets to fill out your environment and develop the functionality that defines the genre. More importantly, you will be able to extend and customize the basic game by making use of any of the extra objects included but not specifically used in the book. This makes it an excellent choice for the classroom where you can break the students into teams and let them use their imaginations to make the book's project more challenging!

    I hope this book will help many of you take the next step toward that 'dream game' you've always wanted to make!

    -Sue

    Version change issues:

    Changes in Unity 3.4:
    You are required to use "internal" rather than "private" when declaring variables that need to be accessed by other scripts but hidden from the Inspector.
    This is the cause of the "...is inaccessible due to its protection level." error.


    Changes in Unity 3.5:
    "#pragma strict" is at the top of all new [javascripts] scripts. You may not use dynamically typed arrays for mobile platforms and that is what #pragma strict checks for. It will report errors where JavaScript arrays (rather than Unity arrays) are used.

    There are several scripts that use JavaScript arrays in the book's project. The project is not designed for mobile platforms so you can safely remove #pragma strict from the top of the scripts.


    Changes in Unity 3.52:
    someObject.active = true;
    someObject.active = false;

    has been depreciated and has been replaced with:
    someObject.SetActive(true);
    someObject.SetActive(false);

    These don't cause errors, but they do generate a warning

    Changes in 4.0:
    Importing needs to be handled by using the Legacy option- make sure that after you import, you click on the asset in the project view, click Rig > Animation Type > Legacy, and then apply.Unity is switching the animation control over to Mecanim slowly and we've lost functionality in the process for mechanical type animation

    in the book, forget about the AnimationObjectsFull assets section- just set up AnimationObjects

    Use Legacy Store in Root (new) for the Animation Type
    Set up the animation clips
    Drag the asset into the hierarchy view

    It might look something like:
    SomeObjects
    objectA
    objectB
    some other objects

    The Animation component will be on the root, SomeObjects

    So now duplicate it once for each of the objects that animates, let's say ObjectA and ObjectB

    Rename the root object, SomeObjects to match the one you will leave inside it
    then delete the extras in each

    so now you might have:

    SomeObject
    some other objects

    ObjectA Group
    ObjectA

    ObjectB Group
    ObjectB

    This gives you two benefits- the individual groups can be moved around the scene and the objects can now be triggered independently

    to call the animation, you will always need to call it from the parent:
    theParent : GameObject = gameObject.Find("ObjectB Group");
    theParent.animation.Play(); // play ObjectB Group's default animation

    Triggering a second object when one is already playing and they are in the same group can cause the first to stop playing or move to some odd place in the timeline. If you were always going to trigger them one at a time and wait until each was finished you could leave then together.
     
    Last edited: Feb 28, 2013
  2. Rush-Rage-Games

    Rush-Rage-Games

    Joined:
    Sep 9, 2010
    Posts:
    1,997
    When is the book released?
     
  3. k3D-Junkie

    k3D-Junkie

    Joined:
    Jun 14, 2011
    Posts:
    236
    The book is released and shipping, you can find it on Amazon-

    (amazon.co.uk has a nice first review, too )
     
  4. Rush-Rage-Games

    Rush-Rage-Games

    Joined:
    Sep 9, 2010
    Posts:
    1,997
    Do you think you could show a webplayer/picture of what you can make with this book? :D
     
  5. k3D-Junkie

    k3D-Junkie

    Joined:
    Jun 14, 2011
    Posts:
    236
    I've posted a few images in the Showcase forum, but don't want to give too much away since that's half the fun of doing a book project :)

    I did show a pic of the maze from chapter 15 along with the "Easter egg" - a mini-map overhead view of it (I won't say how to toggle it off and on)- so far, that's everyone's favorite feature... because it resets...

    http://forum.unity3d.com/threads/93795-My-Unity-book-project!

    Sue
     
  6. 3Dgal

    3Dgal

    Joined:
    Aug 27, 2009
    Posts:
    17
    Here's a picture of the cover ... hope this gives you an idea.
     

    Attached Files:

    Last edited: Jun 21, 2011
  7. k3D-Junkie

    k3D-Junkie

    Joined:
    Jun 14, 2011
    Posts:
    236
    hi guys,

    I contacted the publisher yesterday and they told me the assets would be up this week (I will keep checking up on them).
    besides the art assets, you will also be able to download the unity projects start and finished per chapter, the finished scripts for each chapter, and I've also included a bonus version of the finished game with a few new goodies that are explained in the gameNotes
    You will also get the post-publish fixes for the bits pieces that sneaked by the edits- keep an eye on this thread where I will update that whenever necessary.


    -Sue
     
  8. Eric_WVGG

    Eric_WVGG

    Joined:
    Jun 22, 2011
    Posts:
    3
    "a classic first person adventure game" I assume you mean third-person?

    At any rate, sounds exciting. When will the eBook version be ready?
     
  9. k3D-Junkie

    k3D-Junkie

    Joined:
    Jun 14, 2011
    Posts:
    236
    No, First Person is correct. I was originally going to have a chapter devoted to the changes needed to take the first person (Myst/Riven/Zork style) to third person (Tales of Monkey Island, etc), but by then the book was already over 900 pages (with lots of images) and and my publishers wanted me to finish it.

    I do discuss some theory and even have some examples in the last chapter, but to introduce serious character animation and control, dialog trees and deal with camera control, I decided it would need a second book to do it justice (not to mention lots of cool new assets!). I believe there's plans for AI in Unity at some point, and that could make for even more useful things to include with a third person continuation.

    The nice thing is that most everything covered in the book will be needed for third person :)

    I actually think a lot of people will be able to take that step on their own at that point, but am quite happy to help when I can- that's one of the reasons I started this thread.

    No idea when the e-version will be available, at this point I'm concentrating making sure the assets are available ASAP.

    -Sue
     
  10. 3Dgal

    3Dgal

    Joined:
    Aug 27, 2009
    Posts:
    17
    For anyone who wishes to start working on the book: the first 4 chapters you are not really using any special art assets. After starting the book, here's my take so far:

    Ch. 1 - I really like the explanations on real-time games. For an artist who hasn't done any programming, there are many things to consider when building a game, not only making the art fit the game. The explanations made me realize that real-time 3D games are soooo different than pre-rendered games, leading to why certain things are done in a certain way.

    Ch. 2 - Unity Indie basics. I like the part on unwrapping, lightmaps, and materials in Unity game engine. I didn't realize that certain things in 3DSMax don't work in Unity, and has to be done in Unity.

    Ch. 3 - Beginning scripting. Using cubes and spheres (which you don't need art for), you create simple scripts that add interactivity and explained what you are doing and why. Here I really slowed down and worked through the book - the code styling made it difficult to go quickly.

    Ch. 4 - Creating your environment. Using Unity's own terrain generator, creating a test environment to play with. I did mine and it's OK, not the greatest, but I had fun doing it. I think after this chapter, I will have to download the art assets, so I'm following the book closely.

    This is a fantastic book! I'm excited and can't wait ...
     
  11. jonpeter001

    jonpeter001

    Joined:
    Jun 23, 2011
    Posts:
    5
    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 on and gradually expand.
    * In the second part, you yourself will build the foundations of a point-and-click style first-person adventure game—including reusable state management scripts, load/save functionality, a robust inventory system, and a bonus feature: a dynamically configured maze and mini-map.
     
  12. Rob64

    Rob64

    Joined:
    Aug 15, 2010
    Posts:
    18
    Just wanted to say thanks Sue for a fantastic book, I live in Australia and received mine yesterday, only briefly looked through it yet but know it's a mine of information and well put together, I have the other Unity books so I can compare. You did a great job. I'm working on a game like Myst and maybe we'll see the return of these sorts of games. Rob.
     
  13. gposchman

    gposchman

    Joined:
    Jun 8, 2011
    Posts:
    31
    Hi, my name is Gene, and I am interested in your book, but I am concerned about who would benefit from your book. I am not new to programming, I do a bit of JavaScript programming, so I am not too worried about that. However I am not a particularly good artist, I get by with 2d and PaintShopPro, see www.renaissanceplayer.com if you want to see some examples.

    I want to marry two genres together in 3d using Unity. I have been an adventure game player since Sierra introduced KQIII and have mostly played HOG in the casual game arena. My goal is to integrate the two into a project I have in mind. I am thinking about doing in in either first or third person and it seems your book may be just what I need.

    I have worked through “The Game Maker's Apprentice” and “Game Makers Companion” and they were extremely helpful in understanding development, bu I really would like to take my project into 3d.

    Since I am not an artist will your book be the right fit?

    Gene Poschman
     
  14. k3D-Junkie

    k3D-Junkie

    Joined:
    Jun 14, 2011
    Posts:
    236
    Hi Gene,

    Welcome to Unity and 3D! I don't go into asset production in my book- for that, there are lots of good books, websites and forums for 3DS Max, Maya, Blender and others. Having some JavaScript is a great start as you will be familiar with the syntax, but you will be surprised at how much there is that is specific to real-time 3D. As most of the Unity books will tell you, creating even a casual game will take some time. My approach is to solve the functionality and game play a little at a time, building and making it better with each pass.

    You don't have to be an artist or designer to benefit from this book. I have assumed that many readers will have no programming experience, so I will generally take the long way around to script something so it is easier for them to read and understand.

    The great thing about Unity is that you don't need finished art assets to get most of the game working. You can use placeholder textures and 3D proxy meshes while you get the functionality worked out, and then replace, improve, and re-import at will. You may even decide at some point that an idea that looked good on paper just doesn't work in game. If you had spent days or weeks on creating and possibly animating it first, you would be more likely to leave it in- to the detriment of your game.

    That being said I've made a lot of extra assets for people to experiment with and will be more than happy to discuss functionality that readers would like to incorporate into the base scene. You will get lots of practice using both imported animations as well as become quite good with Unity's Animation editor.

    As you start to create your own assets in 3D, don't get discouraged if they don't look good enough- it just means they need more work! And if you are having trouble deciding just what exactly it is they need (which is usually much tougher than actually making the changes), there are always lots of people willing to give advice.

    Anyway, hope that helps a bit,

    Sue
     
  15. gposchman

    gposchman

    Joined:
    Jun 8, 2011
    Posts:
    31
    Hi Sue,

    Thank you for your quick response. I first got interested in Unity 3D from my Granddaughter’s boy friend. He attends a local community college here in the SF Bay Area and they are using the Unity 3D engine in their Game Development Certification program. Apparently Unity 3d has a tremendous appeal to artists. He was excited to discover I had a JavaScript background and was interested in doing Game Development. I have read some reviews of your book and I have pretty much decided I will get the PDF eBook from aPress. I initially purchased both Game Maker books from aPress and found having the book on screen while doing the game projects very helpful.

    I have already developed an inventory system and an HOG hint system in the Game Maker scripting language, and I look forward to seeing what you developed in your book. Additionally my game project has a backyard maze (Victorian hedge type with pit falls and appropriate things that go bump in the night) that leads to a graveyard so that is another aspect of your book I am looking forward to.

    I'll update my progress through your book and hopefully I can provide some programming insight when I start working on my own projects.

    Gene
     
  16. k3D-Junkie

    k3D-Junkie

    Joined:
    Jun 14, 2011
    Posts:
    236
    Sounds good, Gene! I look forward to lively discussions on alternate implementation and cool ways to extend functionality for new features.

    Sue
     
  17. k3D-Junkie

    k3D-Junkie

    Joined:
    Jun 14, 2011
    Posts:
    236
    I got a reply from the publisher- the assets will go up on Thursday.
    If there are any more delays, we will go to plan B where I will at least make sure the art assets are available.

    Also got my website up - nothing fancy yet, but at least now I 'exist' ;)

    Sue
     
  18. gposchman

    gposchman

    Joined:
    Jun 8, 2011
    Posts:
    31
    Hi Sue, WEB Site is...


    Gene
     
  19. 3Dgal

    3Dgal

    Joined:
    Aug 27, 2009
    Posts:
    17
  20. ChiefPMM

    ChiefPMM

    Joined:
    Nov 6, 2010
    Posts:
    9
    The source code/download tab is now viewable on the Apress website ... 3.2GB.
     
  21. k3D-Junkie

    k3D-Junkie

    Joined:
    Jun 14, 2011
    Posts:
    236
    News flash!

    The assets and e-book are now up on the Apress website, http://www.apress.com/9781430234227

    The download is 3.2 GB and includes art assets, finished code by chapter, Unity projects start and finish per chapter, and the post-publish doc file.



    -Sue
     
  22. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,462
    very cool, going to order mine today :D
     
  23. gposchman

    gposchman

    Joined:
    Jun 8, 2011
    Posts:
    31
    I purchased the eBook from aPress yesterday and downloaded it. Sue, there is a message about the original PDF using advanced features that are not available in the current download. I do not know what they are or if they matter, they haven't so far, I am on page 114.

    I have read the reviews of this book and I intend to write a full review at Amazon and aPress, but I decided to write a running review here as I am going through the book.

    The first hundred pages.

    I like Sue Blackman's prose style and how she describes various aspects of the adventure game and the elements in Unity. I have already gone through several tutorials on the product and I like how she presents the information. I have already picked up on some things available in Unity that were either passed over in the other tutorials, or just didn't cover them as well.

    Does one need a brief history about adventure games, there are so many. Yes, I lived through the era that Sue talks about and she referenced things I was unaware of, and I started playing computer games on mainframes following grids on a typewriter device playing Star Trek. For those who complain about the history, if you are going to create a AAA game or a casual game, there is information about being successful that in included in the history, and if we do not learn from history, we are unfortunately going to repeat past failures. If you have already created a game and successfully published it and made some money, and you are only interested in learning about Unity, then skip to chapter 2, but you will miss out.

    I got the online PDF for two reasons, I didn't want to wait for it to be shipped, or go looking in stores for the book, and I like having an online book while I have the engine I am working with, it is quicker and easier to move through the lessons, and I tend to play more with code and parameters which make the learning experience that much better. A note here, I am not a fan of video tutorials, it is mind numbing going back and forth over video to catch a missed phrase, I can work better at my owns pace with an online book.

    So for the first hundred pages this is a definite thumbs up.


    More to come.

    Gene
     
    Last edited: Jun 29, 2011
  24. k3D-Junkie

    k3D-Junkie

    Joined:
    Jun 14, 2011
    Posts:
    236
    Hi Gene,

    If it is a message about the PDF, I'm not sure what it is referring to but I'm sure we can sort it out if need be.

    Just having a chuckle over Star Trek- it was the reason I didn't learn what a sine wave looked like until college math. Never could get computer time to run my [gag!] punch cards for 10th grade algebra/Trigonometry and Computer Science homework because of the kids who hogged the school's only computer playing that game! Don't feel guilty though- I didn't find that sine waves were actually useful until I started doing 3D in the early 90s :)

    -Sue
     
  25. Rob64

    Rob64

    Joined:
    Aug 15, 2010
    Posts:
    18
    After a nail biting 12hr. experience downloading the source code for the book from a server that does not allow "resume download" I find it's in a html form called "index(1).html", is this supposed to be the assets for the book. When I navigate to it from Unity I can't find anything at all to import and if I try to open it with a browser it's all in some sort of code. Have I got it all wrong, I thought I would be downloading textures and meshes and script for the project in the book. Need some help or advice please.
    regards Rob.
     
  26. c-Row

    c-Row

    Joined:
    Nov 10, 2009
    Posts:
    847
    Hi Rob,

    was the html page inside the zip you downloaded? Or did it only download this html page?
     
  27. gposchman

    gposchman

    Joined:
    Jun 8, 2011
    Posts:
    31
    Hi Rob,

    When I downloaded the assets, it was a zip file with a long numeric name and it was 3+ gig, it took a little under 2 hours to download. It may be that aPress could break up the file by chapter to allow those with slower connections to download it before the reach social security age. Wait a minute, I already am ;>)

    Actually for me it was a piece of cake.

    Gene
     
  28. gposchman

    gposchman

    Joined:
    Jun 8, 2011
    Posts:
    31
    So I am in the middle of chapter 5 and I decided to call it a day and report on the second hundred pages. I am still not disappointed. I found a minor reference error with regards to script "FPS Input Controller" the line numbers referred to in the windows version is suppose to be line numbers 38, and 39, but are actually 36 an 37. Since it is at the end of the script and the content of the lines is clearly described in the text, it is a nit, possibly a typo. I make more mistakes in forum responses then I have found in the book so far.

    The scripting directions are excellent and I like the way the code is being explained and presented. The relationship between images and text is very well done and I have been able to follow through with a fair amount of ease. The side comments are extremely helpful as I am new to 3D and I have a much better understanding of why some things are done the way they are.

    Unity's First Person Interface is very nice and I found the changes provide by Sue very much in line with how I want my project to look, although I am still thinking about having a third person pseudo interface, we'll see. I'll add my Thanks to Sue for this here, in case I forget to do so later.

    I am not an artist, but I am a JavaScript programmer, but I am a lazy JavaScript Programmer who in not the least bit interested in re - inventing the wheel. I am not above taking code and adjusting it for my own needs and the code I have seen so far will go along way in speeding the programming effort for my own project. Sue's explanations for things is extremely helpful. I start on collision walls tomorrow.

    Gene
     
  29. Rob64

    Rob64

    Joined:
    Aug 15, 2010
    Posts:
    18
    I seem to be getting into a right mess here. I first of all went to the book site and clicked on the download source files, up came the box giving the number of the file....9781430234227.zip, it gave the option of "open with Unity" or "save to wherever" as downloads normally do. I always save the file somewhere so I did. Realising it was going to take ages I thought I'd better get a programme where I could resume downloading in case something interrupted it so I used "free download manager". It downloaded the 3.2gb file and it's called "index(1).html" So I tried again, this time with windows 7 (download time is more like 15hrs, my speed fluctuates between 150 and 50 kbps.), this time I used "open with Unity" It downloaded normally and finished properly but it seems to be only a part file with no Unity icon, in fact I seem to have a zip.zip file with 299'060 kb, a zip. file with 299,015kb, a zip. file with 8,565kb. I cant get any into Unity as a package or assets. I've also tried to add the files together to try and get a complete download. Grateful for any help everyone and thanks for your interest up till now. Rob.
     
  30. Rob64

    Rob64

    Joined:
    Aug 15, 2010
    Posts:
    18
    I can't find any 3.2 GB files anywhere, the biggest of those zips I downloaded is 292MB, I tried extracting and it just extracted to a part file the same size. Would my server limit me to a file size? It downloaded and finished normal though, a box came up from taskbar saying download finished.
     
  31. gposchman

    gposchman

    Joined:
    Jun 8, 2011
    Posts:
    31
    Hi Rob64,

    The HTML file that was 3.2 gig, can you find it? It may be the zip file and the name may be erroneous. Change the name to "anything dot zip" (filename.zip) and see if you can get it to unzip. If it is not recognized, than it may be worthless. However, if windows 7 recognizes it as a zip file, then you can unzip it. Be warned, it contains a bunch of rar files that need to be processed also. It is a S--- load of data.

    Good Luck

    Gene
     
  32. k3D-Junkie

    k3D-Junkie

    Joined:
    Jun 14, 2011
    Posts:
    236
    hi Rob,

    Good thinking on using "free download manager"- not all of us have fast internet (me included!)

    As Gene said, once you unzip the big file, you need to unzip the smaller files (rar extension, use winrar or 7zip to unzip them). You will have several folders/directories- keep them separate from the Unity project. For use in the book, you will be asked to move folders into your project's asset folder through the OS as needed. Inside a few of the folders, there are a few Unity package files that you will be asked to import as Unity pkg assets. The majority of the 3.2 GB is several chapters worth of Unity project files. To access them, you would either browse to that folder using File>Open Project or through your OS, find the Scenes folder in that chapter's Assets folder and click on it.

    I'll take a screen shot of the unzipped folders when I get back post it for everyone.

    Sue
     
  33. k3D-Junkie

    k3D-Junkie

    Joined:
    Jun 14, 2011
    Posts:
    236
    Here's a screen shot of what the unzipped folders should look like and what's in them:

    $BookDownloadFolders.jpg
     
  34. Rob64

    Rob64

    Joined:
    Aug 15, 2010
    Posts:
    18
    Hi Gene,

    as one senior to another, a big thank you for that information.I did what you said (after copying the file in case I destroyed it) and it unzipped to all the rar files. I started in computers late in life and getting older I seem to forget half of what I learned.

    Hi Sue,

    Thank's to you too, I've got 16 files, looks like I've got the lot. Agreeing with Gene's comments regarding your book.

    Rob.
     
  35. gposchman

    gposchman

    Joined:
    Jun 8, 2011
    Posts:
    31
    I have just completed chapter 5 and I am delighted with the first person player and the changes incorporated for navigation. I am still undecided about first and third person for my own project. The changes Sue provides in the book for the Unity FPS looks like with some camera adjustments and navigation tweaks, I could create a pseudo third person interface. Chapter five also covers some platform scripting, collision detection, and collider/trigger scripting. All of this will be highly practical for an adventure HOG game. The book is clearly applicable towards the game genre I am interested in. I should also note that there are some other types of games I have on the back burner and much of what I am learning will be applicable with them also.

    I like the modular scripting as it will allow me to put into a library scripts and functions that I will be able to draw upon in future projects. At this point, I am a quarter of the way through the book and I can already recommend it. A couple of times I have had to do some rereading, but that is partly due to my own impatience to move too quickly. I have settled into reading a section without doing anything in Unity, then going back with Unity up and working through the project examples. I use the online version, and I admit that I read through the scripting examples and play with them, and I use cut and paste a lot, I am a terrible four finger typist.

    The first build was fun to play with. I will have more.

    Hi Rob, I am glad it worked. I started with computers early in life, it is a bit of a love hate relationship that has lasted almost as long as my marriage which has been a lot more positive. (BSEG)

    Gene
     
  36. k3D-Junkie

    k3D-Junkie

    Joined:
    Jun 14, 2011
    Posts:
    236
    Hi Gene, you could skip to the last chapter where I discuss the changes you would probably want to make to do a third person :) It is mostly theoretical, so not really a spoiler for the project.

    Meanwhile, most of what you will have by the end of the book (inventory, state management, load/save) will carry right on to a third person and is the next logical progression. Cameras will be more challenging depending on style, but controlling (driving) a character will be almost seamless since Unity's first person is pretty much just a "person" with a camera attached to the head instead of following behind..

    Glad to hear you are experimenting as you go along- that is exactly what I hope people will want to do!

    Sue
     
  37. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,462
    Just got it in the mail Friday.

    Very helpful so far.
     
  38. gposchman

    gposchman

    Joined:
    Jun 8, 2011
    Posts:
    31
    I have had my first problem, It is in doing the animations. The close lid for the chest doesn't seem to work. When everything was on automatic in the first go round everything seemed okay. Now I am separating things out in chapter 7 and applying animations individually, and the lid will not close.

    The script works okay because I used it for the key insert and key remove on key at lock and that works just fine. I applied door close as the audio with delay, for the chest lid closing and I get the audio okay. The chest lid just wont close. Any ideas. I suspect the clip, but I am not sure how to test it out and to get the correct one back into the list.

    I suspect, I did something stupid.

    Additional information I click on the lid and it opens with sound, I click on it again and I get the door slam, but the lid remains motionless. I click on the lid again and it reopens.

    I noticed on the clip information that the clip begins at 91 and ends at 110. The clip for key remove begins at 121?????

    Gene
     
    Last edited: Jul 5, 2011
  39. Zoneman

    Zoneman

    Joined:
    Feb 6, 2010
    Posts:
    42
    I've been trying to download the source code several times since it posted. I cant get past 1.2 gigs. Would it be possible to post smaller size zips in a few packets? I admit I don't have the fastest connection. Has anyone successfully downloaded…?
    Note I have downloaded other files that where more that 3 gigs. I wonder could the Apress server be a problem. I don't know.
     
    Last edited: Jul 5, 2011
  40. k3D-Junkie

    k3D-Junkie

    Joined:
    Jun 14, 2011
    Posts:
    236
    hi Zoneman,

    Rob64 used a "free download manager" to get the download. I had a lot of trouble uploading small files (10 MB) to the Apress server with my [pathetically] slow internet- assuming it was timing out. For the final assets, I had to drive out to a neighbor who has fast internet. I uploaded the files in several separate rar files was hoping they would keep them separate just for those of us that are bandwidth impaired. All of their book web pages are set up with only one download, so not sure how much trouble it would be to split them back up, but I will check tomorrow.

    Sue
     
  41. k3D-Junkie

    k3D-Junkie

    Joined:
    Jun 14, 2011
    Posts:
    236
    Hi Gene,

    Try the last close lid animation in the Project view. I'm looking into the chapter 7 files now.

    Sue
     
  42. Zoneman

    Zoneman

    Joined:
    Feb 6, 2010
    Posts:
    42
    Thanx Sue Got it. I found a better connection. I'm good to go now.
    :)
     
  43. gposchman

    gposchman

    Joined:
    Jun 8, 2011
    Posts:
    31
    Hi Sue,

    I ran tests on all the close lid entries, none of them work. I loaded up chapter 7 finished project and ran through it, and it worked fine. Clearly I goofed, but since I can get the key in and out to work as an animation with sound, I am moving forward. I will re visit this later. Thanks for the advice. If you have another idea, it would be greatly appreciated.

    I find I get antsy, because much of what I am working through is applicable to the project I want to get started on, but I need to maintain student mode for now, because I am not yet ready to take on the project, but once I am through your book, I figure I will be.


    Gene
     
  44. k3D-Junkie

    k3D-Junkie

    Joined:
    Jun 14, 2011
    Posts:
    236
    hi Gene,

    Don't always assume it was something you did :) 3D game engines evolve quickly and with every release there are likely be things that get broken or no longer work the way they used to- if you've worked through any of the older tutorials you'll know what I am talking about. Writing a book for that kind of "moving target" is particularly challenging! The changes in the FBX file format, the remake of the first person controller scripts and handful of things that were suddenly no longer supported or even illegal meant rewriting sometimes whole chapters.

    Unity's implementation of imported animation is great for things like characters where you want everything controlled at the root, but if you want all of the animations on a group of related objects to animate independently and choose Store in Nodes, then it generates all those duplicate animation clips which makes it baffling, to say the least. At some point in the book, you will script the option to specify the parent object that holds the animations for all of its children- which then allows you to use the Store in Root option. You are also going to be getting a lot of practice with Unity's own animation editor.

    All that being said, I'm going to try to import the chest group into a clean file see what happens. The earlier chapters were done in an earlier version of Unity and then updated to the version that was current at the time of the book's release, so that could also be the culprit.

    I'll report back...

    Sue
     
  45. k3D-Junkie

    k3D-Junkie

    Joined:
    Jun 14, 2011
    Posts:
    236
    Reporting back:

    Started a clean file and imported the Animation Objects. Set the animation to Store in Nodes, everything working.

    Here's a tip for making Store in Nodes easier to use:
    1- import objects
    2- set to Store in Nodes
    3- drag the object group into Hierarchy
    4- Select each object and click on the loaded default animation for each and write down the position of clip in the Project view

    5- create the animation clips in the Inspector
    6- to load the correct clip as default in each of the objects, select the clip in the Animations array so that it highlights in the Project view
    7- drag the identified clip from the Project view directly into the default Animation

    As soon as you start adding scripts to the objects, the prefab is broken and resetting the animations gets trickier.

    Sue
     
  46. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,462
    I'm about half way through with zero problems, been hopping around here and there but tend to find my way back and start reading through it properly.

    I haven't used any of the downloadable assets, the explanation of things is so well done that I'm translating them into things i can do with my own game and applying them directly and it's working great. I really appreciated the scripting chapter and the effort made to assist complete beginners to scripting. I think you've done an excellent job with the book, i'll be writing a positive review when i finish it. I'm actually hoping there will be some more advanced books from you in the future.
     
  47. Zoneman

    Zoneman

    Joined:
    Feb 6, 2010
    Posts:
    42
    Zerobounds, Yeah I agree, I'm on chapter 5 and I've be doing the same thing...building as my own assets as I go. I've attached a vehicle to my charactor. As an artist, it's a real joy to start interacting with my own stuff. So far it is working out, because the instructions Sue has provided are so easy to implement. I hope I can implement my own assets threw out the lessons.

    If you want a sneakpeek [warning: very cheesy at this point]
    http://www.zonesight.com/UnityDev/eXMars/eXMars.html

    I'll be updating regularly… comments welcome.

    Yea Sue!!!
     
    Last edited: Jul 5, 2011
  48. gposchman

    gposchman

    Joined:
    Jun 8, 2011
    Posts:
    31
    Hi Sue,

    Thanks for the follow up. Since I got the Key at lock to work, and the final project in chapter 7 works okay, I am good to go. The scripting works, and that is my main concern. For now, I am interested in character animation, and individual game object animation, and the chapters coming up look very exciting for me.

    So when did you give up sleeping?? :>}

    Gene
     
  49. gposchman

    gposchman

    Joined:
    Jun 8, 2011
    Posts:
    31
    I have just finished chapter 8, and it suddenly hit me... I should comment that I appreciate the generic way Sue has been handling scripts through out the book... and what lit up for me is that not only is the reader receiving some good scripting techniques, some great insight into Unity 3D, but she is providing the bones for a game engine that is easily replicable into other game types. I suppose I should reread the introduction, because I didn't get it until now. I was preparing myself for some significant effort in setting up state arrays, inventory management, and asset utilization, and Sue has laid the beginning of a solid foundation that will make it easier for me to develop additional games. Well done.

    Gene
     
  50. k3D-Junkie

    k3D-Junkie

    Joined:
    Jun 14, 2011
    Posts:
    236
    Thanks Gene,

    And yes, you are beginning to see what the book is really about. It's not about making a first person adventure game- that's just the vehicle for the real guts of the book. It's about learning to analyze need, create systems that cross over into many different genre and end up with scripts that allow you to quickly expand your game, whatever the genre. People who pass by it because they think it's only about making adventure games may be missing out on lots of good stuff!

    The temptation with games is to hardcode everything because it seems like the quickest way to do things. But as you start adding more conditions for what the object should do in every situation, it gets out of hand quickly. When you only have a few objects, it's no big deal to go back and change their code. But as your game gets packed full of 'action' objects, it becomes a nightmare to maintain them. Even if you don't reuse the scripts you will have at the end of this book for your own project, I'm betting your approach to writing your own will be vastly different than if you hadn't found the book :)

    -Sue