|
Title: Best Unity Tutorials for Experienced Developer Post by: randomshade on January 19, 2013, 11:33:57 PM Situation:
-Need to learn to use Unity and be proficient* in a week** -Experienced game developer: coded over a dozen commercial titles on a variety of platforms -Very familiar with all levels of game coding: engine, graphics, physics, tools, gameplay -Expert level C++, solid C#, decent AS3, remedial JS, Java, HTML, PHP, Blah blah blah My friend google seems to be my enemy this time around: there are a *shit ton* of Unity tutorials out there. More than I could ever possibly hope to comb through. Which is bad, because I'm on a super tight deadline. I've watched a few videos and read some things, but the majority of what I'm finding is not only a tutorial to Unity but also a tutorial on game development; I don't need and don't have time for the latter :) Also, lots seem wicked out of date or come bundled with busted links. So, at the expense of starting a new thread on a subject that has been covered a gazillion times while offering only a simple twist, I ask: do any of you have suggestions on the best rapid fire Unity tutorials made for seasoned game developers? If other details help: heavily UI driven game; core gameplay is in 3D but very, very simple. Coding will all be done in C#. Target platforms are iOS and Android (ultimately, but prototype is just PC.) * - need to hack together a feature minimal prototype in a week and at least be somewhat confident I know what I'm doing. ** - Yes, this is contract work. Yes, I'm doing a favor for a friend, hence the silly deadline. Title: Re: Best Unity Tutorials for Experienced Developer Post by: knightSquared on January 20, 2013, 12:04:15 AM I've personally used Unity's own manual to learn unity. Their main page is broken up into sections, so it's easy to pick and choose:
http://docs.unity3d.com/Documentation/Manual/index.html (http://docs.unity3d.com/Documentation/Manual/index.html) Title: Re: Best Unity Tutorials for Experienced Developer Post by: randomshade on January 20, 2013, 12:33:17 AM Yeah, I'm sort of slowly working my way through the manual :) It has definitely helped with getting familiar with the interface which I assumed would be trivial coming from using 3DS Max previously (bad assumption.)
Here's an actual question that should illustrate the kind of things I am trying to learn. Most of the games I've ever worked on are state machine driven. You have different states, push/pop/transition between them, and the core logic for any given section of a game is controlled in its respective state. From what I've gathered thus far, Unity doesn't seem to use this set up. Which is fine, but my question is: do scenes in Unity effectively act as the logical state? And if that's the case, how is the best way to structure the core logic of the main "state" when you want to have multiple scenes loaded at once? Edit: I realize that what I'm really looking for is a set of tutorials specifically designed to me and my previous experience...and I realize it probably doesn't exist :) I am still open to any possible suggestions. Every bit of time that I can save in the learning process is a big win! Title: Re: Best Unity Tutorials for Experienced Developer Post by: knightSquared on January 20, 2013, 12:57:36 AM How I would do it is to create a global state machine script (in C#), and attach it to a single game object that's going to live in the scene. I would then tag that game object as a "StateMachine".
If you ever want to access that state machine from other game objects, then you can use GameObject.FindGameObjectWithTag("StateMachine").GetComponent<StateMachineScript>(), where StateMachineScript is your class name. Using Find functions in Unity can sometimes be slow, so try caching wherever possible. If you're lazy like me, I would attach that state machine to the Main Camera, and access it through script from other game objects using Camera.main.GetComponent<StateMachineScript>(). Another option is to get Play Maker Unity plugin. It's a popular visual scripting engine that I've used at a company that I work under contract. It works really well: http://www.hutonggames.com/ Title: Re: Best Unity Tutorials for Experienced Developer Post by: bateleur on January 22, 2013, 02:39:48 AM Here's an actual question that should illustrate the kind of things I am trying to learn. Most of the games I've ever worked on are state machine driven. You have different states, push/pop/transition between them, and the core logic for any given section of a game is controlled in its respective state. From what I've gathered thus far, Unity doesn't seem to use this set up. Which is fine, but my question is: do scenes in Unity effectively act as the logical state? And if that's the case, how is the best way to structure the core logic of the main "state" when you want to have multiple scenes loaded at once? If you're trying to do something to a very short timescale you're going to have a hard time if you fight against the way Unity wants to do things. A scene is intended to be an encapsulation of a complete mode of the game. So, for example, the attract mode, the options screen, the hiscore table or (most often) a level. Don't put more than one scene on the screen at once. You can, but it's a lot of added complexity you don't have time for. The main way to set up state machines and control logic generally in Unity is via scripts. Scripts must be added (as components) to GameObjects in order to run. Use the Awake() and Start() methods for setup and then Update() or FixedUpdate() for per-cycle processing. All scripts are objects. The source file for a script defines a class (in the usual object oriented sense). Add variables to the class to store whatever state you need. You can add multiple scripts to the same GameObject if you like. Enabling and disabling different scripts can be a nice simple way to implement the effects of state transitions. Ideally, objects should communicate by having variables which point to one another and using them to call methods on each other. However, for a quick-and-dirty way to hack together some communication on a tight deadline you can use static fields in your script class to communicate references to useful objects globally. Title: Re: Best Unity Tutorials for Experienced Developer Post by: randomshade on January 22, 2013, 11:34:54 AM Here's an actual question that should illustrate the kind of things I am trying to learn. Most of the games I've ever worked on are state machine driven. You have different states, push/pop/transition between them, and the core logic for any given section of a game is controlled in its respective state. From what I've gathered thus far, Unity doesn't seem to use this set up. Which is fine, but my question is: do scenes in Unity effectively act as the logical state? And if that's the case, how is the best way to structure the core logic of the main "state" when you want to have multiple scenes loaded at once? If you're trying to do something to a very short timescale you're going to have a hard time if you fight against the way Unity wants to do things. A scene is intended to be an encapsulation of a complete mode of the game. So, for example, the attract mode, the options screen, the hiscore table or (most often) a level. Don't put more than one scene on the screen at once. You can, but it's a lot of added complexity you don't have time for. Yes, I realized rather quickly that loading multiple scenes is probably not a good idea for my use case. Which is fine, just a different paradigm than I am used to. Thanks to both of you for the helpful insight. I can see why Unity is pretty popular as I've gotten up and running a lot more quickly than I originally anticipated. Still going to be tough to hit the first deadline this week, but we shall see. On a semi-related note, I may look to bring in some additional help at various points during the project. If anyone reading this is a Unity pro that does contract work, send me a PM. I may put up a post in help wanted as well when the time arrives. Title: Re: Best Unity Tutorials for Experienced Developer Post by: userXDev on January 28, 2013, 02:14:02 PM Have you seen this list of tutorials on the Unity Answers Forum?:
http://answers.unity3d.com/questions/12321/how-can-i-start-learning-unity-fast-list-of-tutori.html Could be of use to you, some good stuff there :-) |