I recently got my copy of Unity Indie. I’ve lots of experience with computers and gaming in general, but none with scripting. After doing some research, I decided that the best scripting language for me to learn is Javascript.
The problem is, all of the Javascript resources I can find seem to be specifically tailored for people using Javascript with HTML and on webpages.
Can anyone recommend a few books/websites that’ll teach me at least the components of Javascript that I need for Unity?
Those sites have lots of example scripts, but I’m looking for somewhere where I can learn from scratch. Do you know anything (websites or books work) like that?
I’m still waiting for that page to get filled in. I’ve tried to read the Mozilla reference, but I find it to be horribly put together. I’m going to try this one next:
I would be interested to hear how other people gained expert coding abilities. I think I learn quickly, but only if I have good resources. I really like reading manuals straight through, but it doesn’t look like programming languages have manuals like individual pieces of software do.
I learned to program by just buying a C++ book, making small simple (useless) programs. Then I just practiced, read as many articles and tutorials about C++, and started programming small 2D games (I never finished a game back then though. So it was slightly discouraging). As time went on, I learned the finer details of the language, better programming practices, design patterns, new programming APIs and new programming languages (once you know one, it’s not very difficult to migrate to another, assuming you know how to actually program).
I just want something that gives me a small snippet of how I can use EVERYTHING. The Unity manual basically does that, but there are certain things in the Unity manual that require knowledge that is not found in the tutorials or the wiki. I find myself at this point having to look for an external solution to some missing features in Unity, and don’t know where I can go to find all the information necessary about making this all work together.
Having to spend hours, days, etc. looking for information on how to do one simple thing is not really reasonable for me, as I have my fingers in many delicious flavors of pies (making music, games, art, web material, etc.).
As a non-coder Unity user, I don’t want to learn how to program, but I would love to find a basic guide written just about the use of Javascript as it pertains to Unity. In the references I’ve seen, it seems like there’s a lot of focus on syntax, but there are math concepts embedded in the code that simply escape me.
I know that at the end of the day, I would end up learning to program, but it seems like this approach would be far more practical and less theoretical. I have high hopes that the new tutorials will do just that.
I learned object oriented type programming using Flash, and so have adapted that to working with Unity.
Then I have spent quite a time working with Lurid’s excellently-designed code for our projects. There’s no better teacher than high-quality, relevant examples.
I don’t have the perfect reference or training tutorial, but for non-programmers, IMO the most crucial thing is to understand the overall idea of object oriented programming and how it can help you create or work with clean, modular, reusable, extensible code. Having a feeling for those concepts will help you make choices and learn new stuff.
The othe area that is indispensible is a grasp of logic and control structures (AND, OR, IF THEN, etc). The fancy vector math is beyond me, too, but you won’t get far in terms of making things interact if you can’t use logic to make decisions.
Any specialized API (especially one that evolves quickly like Unity’s) always requires constant learning no matter your previous experience, so that’s a moving target for everybody. But the specifics are layered on top of some important fundamentals.
Hopefully the new 2.0 tutorials will be done soon and their code samples should help a lot. The Island Demo is now available for dissection.
An excellent book is “Essential Mathematics for Games”. It may beyond the scope of what’s need (it goings into the details oh how math libraries work underneath), but never the less, you’ll grasp why it works, and what things do
Taking a class in any object oriented language helps a lot. Just a semester at my Uni got me on track, and Unity examples and practice has been filling in the rest.
I am not a natural programmer and never will be, but I feel pretty comfortable with the Unity API.
I have not read them, but I have read most of their other books and found them to be excellent starting points.
In a Unity context, I would start with the C# book. JavaScript might be more beginner friendly, but IMHO JavaScript books tend to be lemons and Unity’s JavaScript looks to be conceptually more closely related to C# than to ‘real JavaScript’. So if the Head First JavaScript book is good, it’ll teach you a way of structuring and thinking about your code not applicable to Unity - e.g. prototype based inheritance, first class functions and ‘all dynamic all the time’.
The C# book on the other hand will teach you concepts in line with Unity’s scripting environment. If you grok the concepts, choosing a language is a non issue.