- Home /
New to programming what should I learn?
I'm sure you have heard this before; nevertheless, I'm just getting started with programming.
I have a couple Java books I'm going to read throughout the summer; however, I would like to really focus and familiarize myself with the areas of code needed for 3D games in Unity. My intention is to learn the entire language; nevertheless, I really want to focus on areas of the book that is most important for making 3D games. Does anyone have any suggestions on areas of programming that is frequently used or that I should focus on? Thank you.
The books I have are: Java - A Beginner's Guide, 3rd Edition (2005) Java.The.Complete.Reference.7th.Edition O'Reilly - JavaScript The Definitive Guide O'Reilly - Learning Java IDG - Java Game Programming for Dummies
Answer by rutter · May 22, 2012 at 04:48 PM
One thing you should know: "Java" and "JavaScript" have very little in common.
If you're just getting started out with programming, it will be pretty much essential that you understand:
Variables and data types (int, float, string, etc.)
Control flow (branching, looping)
Functions
References (or "pointers")
Arrays and other collections
The bad news is that this first set is very complex, and that a lot of people never really get past it -- the good news is that it's also the most general set of knowledge, and generally will carry over into any programming language or programming project that you might work on in the future.
Games in particular have a lot of "domain knowledge":
Collision and physics
Update loops
Rendering
Meshes, materials, and so on
Vectors
Quaternions
Past that, Unity adds still more fun to the mix:
Components
Behaviour scripts
Coroutines
Inspector
Editor quirks
Prefabs and prefab instantiation
This is all off the top of my head, and probably isn't a very complete list.
You might also consider asking this question on the Unity forum, if you're interested in a more enduring conversation about it. I just peeked and didn't really see one, but I wouldn't be surprised if they have one big damned thread about this exact question.
In the meantime, this seems kinda close: http://forum.unity3d.com/threads/34015-Newbie-guide-to-Unity-Javascript-(long)
Good luck.
+1, this sounds right to me. +1 again for pointing to the Newbie Guide to Javascript.
This is really a nice summarization and you put the emphasis on the right things ;)
+1
Answer by hathol · May 22, 2012 at 04:31 PM
To your list of books: Those are 3 Java books and 1 JavaScript book. While the name is similar due to historic reasons (caused by some "clever" Marketing Guy), those are two very different languages.
Java won't really help you with Unity (aside from teaching you some basic programming principles) since (unlike JavaScript) it can't be used to write Unity scrips. Also, the version of JavaScript that Unity uses is not really JavaScript, it's more of a special unity version of it, so even the JS Book you have will probably not help you that much. That's the plain facts.
Now we enter the area of (my) personal opinion: If you wan't to learn programming, and especially if you want to learn programming for unity, I recommend you start learning C#. It is IMO nicer to use, has more features, makes it harder to make mistakes (meaning the compiler will start to complain earlier) and the general principles you learn by using it apply to pretty much every other sensible language out there. C# also comes with the added benefit, that you can get a lot more help for "non unity exclusive" programming problems since the language is widely used in the field by a huge number of developers in a lot of different fields. Again, this is just my personal opinion and preference and there are a lot of C# vs JS threads out there where you will find a different view on the subject.
To get started with Unity, I recommend the video tutorials at http://www.3dbuzz.com/vbforum/sv_videonav.php?fid=808bf515c69066eb13df7952c0d54711 and the more than excellent free unity training by the walker boys at http://walkerboystudio.com/html/unity_training___free__.html
Answer by torrente · May 22, 2012 at 10:11 PM
I would take the time to learn C#. There are tons of good tutorials online. C# is more commonly used as a programming language, which would open more doors for you down the line. Also, the integration from Unity to the .net framework used by Microsoft is great.
All programming languages have similar features, but slightly different ways to do them. Java, C#, C++ have always been my first picks. To me, they all look the same, but that might be due to working with them for so long.
I can totally understand wanting to use Javascript since it is a bit easier. But, take the time to challenge yourself and I think you will be better rewarded. If you end up not wanting to invest the time, it might be a good sign that coding isn't for you.
Answer by Berenger · May 22, 2012 at 04:28 PM
Arrays, Maths for numbers and vectors (matrix are hidden in Unity, you don't have to understand them. It's better of course, but you don't have to). Coroutines, though it's not UnityScript related. With that, you'll be able to do a lot. The next step could be generics. But I suppose everybody is going to tell you something different.
Answer by js103036 · May 22, 2012 at 08:09 PM
These books were given to me by a friend so there wasn't any money wasted. Nevertheless, are you sure C# would be a good place to start for an inexperienced person? I mean, would other programmers or teams recommend me to start here?
Anyways, I'm thankful for the response, I'll look into this language.