The topic probably says it all. I am not a programmer - I probably won’t be one in this life but I still don’t want to give up on it, just yet.
The thing is: I don’t seem to be able to work my way through the scripting reference. I did the basic tutorials and understood most of them but as soon as I try to create something a little more complicated I seem to get lost inside a jungle of different classes and functions.
How did you programming guys start to comprehend all this?
How do you approach a problem you don’t yet know which methods will be the best to solve it?
Starting using only the script reference and tutorials is not the greatest idea in your case, as those tutorials teach you how to use Unity, and don’t really touch on actual base programming instruction.
You are doing it the hard way, so don’t give up on yourself.
What I recommend is that you find a good programming tutorial or book and follow through the sections that teach you the core principles. You can disregard most of the rest of the book that deals with “how to use x module to load y file type”.
I recommend you find a good tutorial in Java or C#, but nearly any language will do. Once you learn the basics, you can then move more easily into learning how to use Unity (and learning the quirks of UnityScript if you choose to use it).
Most of all, remember that programming is hard, and it takes time to learn. Rome wasn’t built in a day…that we know of anyway.
As an additional note, new programmers often make the mistake of thinking that these incredibly advanced high-tech computers are actually smart, and it can take time to change the way you think about problems.
Programming is a bit like teaching a blind, deaf, alien how to tie a shoe. Normally you can tell someone to “hold a lace in each hand, pass the left lace over the right and under, pull tight…”.
With a computer you need to teach it how to hold a lace, where the lace is, what a lace is, how to move each bone of its arms and fingers, and every other movement in exacting detail. If it drops the lace, it doesn’t know what to do unless you account for it in its programming.
Once you learn to think like that, and learn to decompose problems into their specific core steps, you will get a lot more accomplished.
Lurk on the IRC channel. Modify the tutorials to do something they weren’t intended to do. Fail. Ask for help. Go back and do what you did again. (You’ll learn more the second or third time thru a tutorial.)
If you want to do any book learning, learn C#, as all the “javaScript” books (or web tutorials) are NOT UnityScript.js and will try to get you to build a web page, not a game.
Look at the wiki for some basic scripting pages as well.
I’ve learned (some) UnityScript.js by slowly bashing at it. I too come from a non-programming background, so it’s possible.
It’s 1:35 am here. I’ll try to write more details tomorrow about how I kept my sanity (partially) intact while trying to bend code to my will.
Now I do know in theory how programming works (to a certain degree) - I’ve had programming lessons at school/university and I do know some very basic Java.
I think i understood the basic principles of object oriented design and topdown programming.
It’s just that Unity JavaScript, of course, is different. And that’s when I always end up at the refrence-manual-and-other-tons-of-things part
I mean - where’s a good point to start to actually understand a language? Is it really just try-and-error or is there a more structured way to handle it?
I’ve graduated an informatics High School but I still need to do the old trial and error regarding Unity scripts. Also it’s my first time i do physics and 3D programing which is kinda different from the Borland C++ I learned back in school (the 1988 version to be more precise :roll: ). So i advise you to ask, ask, ask cause i see that this community is more than open to help noobs like us.
Sounds like you’ve learned more already than I suspected, so I’ll spare you any pedantic details…
With UnityScript.js, I think it’s trial and error.
The three best resources are the forums, the IRC channel and what there is of the (pixel thin) doc’s and ref guides.
I looked extensively for javaScript tutorials and books and all of them (not surprisingly) assumed that you are a web designer.
There are also enough key differences between UnityScript.js and javaScript.js that it’s been said on the forums and IRC that “studying” javaScript won’t really help you in Unity.
I can’t speak to C#, but most people seem to post that learning C# is portable, and there seems to be a number of printed and online references for that language.
I assume that you know about Will Goldstone’s two tutorial sites:
Yes, C# in Unity works as C# (2.0) should. As a large amount of .Net functionality is exposed to the version of Mono Unity uses, most C# and .Net tutorials or references you find are usable.
Yes I certainly do. Thanks for the reminder, though
Regarding C# - it’s good to know that C# works in Unity like it’s supposed to work but most of the examples and tutorials apparently are in JavaScript. Also that’s the language I tried to get Unity working with over the last week and a half - so I’m not going to switch to C# now.
My biggest problem is probably the 3D programming. I’ve created some simple business applications and tools in C# before, so I know the language a bit. But I’ve never had to use maths before.
I was always terrible at maths, so doing the vector and matrix algebra will probably be my biggest challenge.
It’s not necessary to know any complex vector or matrix math in Unity, unless you want to get into the fairly obscure areas that Unity doesn’t cover with built-in functions. It’s helpful to have an understanding of basic vector math, but that’s really about all you need.