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

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.

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

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.

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.

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.

Srry for bad english. Two months ago i was exactly like you, now im coding all the night tryin to finish my game. If you want to learn the basics of javascript in a easy way, i recomend http://www.codecademy.com/. In 2 days you will be ready for start making some stuff in unity. The second thing i learn, was using the unity script reference. If you know the basics and how to use property the script reference, you only can go in the right way, after that, you need to learn more about control flow and take a look to all the example codes.

Definitely go with C#. It is better in the long run.

Since u are getting started with programming, I suggest u take up javaScript for gaming (it’s actually Unity Scripting…it’s not exactly javaScript)and once u start having some fun with it, shift to C#.

C# is a very strong language and will be quite usefull later on…for purposes other than gaming as well. So getting some books on C# would be a good idea.

As far as resources for learing gaming with javascript/Unity are concerned, there are several tutorials available…following link has a comprehensive list:

http://answers.unity3d.com/questions/12321/how-can-i-start-learning-unity-fast-list-of-tutori.html

One of the awesomest tutorials that I followed was by the Walker Brothers, it can be found here: http://walkerboystudio.com/html/unity_course_syllabus.html

Also, dont forget to go through the Unity Documentation provided here: http://unity3d.com/support/documentation/

so, gudluck…n enjoy gaming!!

Coding is for everyone. It’s human readable script to interact with machines.

I’m strictly an artist and do not claim to be a programmer, although I’ve been writing code for quite some time. I’ve wasted a lot of time learning one language or the other. Learn C# - it is good for many things and works with Unity (which deploys for many different OSs - mobile and desktop… and for free). Later on, you could even use C# to make business applications (boring, but it’ll get you a job anywhere) and it’s very well documented and supported. Get the book “Unity 3x Game Development Essentials”… or the book that is coming out next week on Amazon for Unity development. They are all beginners books. Just jump straight into it. If you don’t understand something, go to Google and it will tell you. For instance: “C# Unity rotate object local orientation”. If you don’t get that now, you’ll get it after a mish-mash of tutorials just to start out with to get your base. I would suggest running through the book word for word first, then go back and go through it again modifying what you can to learn how to use the separate elements. Just experiment. Usually an artist will start by copying others work and not succeeding… making it her/his own… the same comes with writing code. Just keep changing code/textures/models/parameters until it’s what you want.