Where and how did you guys learn to code?

I started with Unity about two days ago, and have been learning and in my opinion, have picked it up quite well. I just wondered, sometimes I feel like most game designers literally just sit down, and code away, with the knowledge of all the code combinations already in their head. Do you guys have to look up how to do things regularly, or just occasionally?

I’d say occasionally.

I started using Unity in April and at first it was pretty hard to make my own scripts that actually work - it was a major pain in the a** trying to get the hang of everything! but nowadays i flawlessly write codes that do exactly what i want them to.

…But every now then i hit a brick wall and have to look things up :-?

I would suggest to slowly go through all of the scripting tutorials Unity provides here: http://unity3d.com/learn/tutorials/modules/beginner/scripting
There is no shame in looking things up via the scripting reference. It’s pretty much how you learn things and at some point you will remember a few things. I’ve been an artist for the past 20 years and just recently started to get into C# myself. It’s going slow but that’s OK. Take it easy but do a bit of coding every day and you will get there.

Wooo… Game Designers code now? :stuck_out_tongue:

I do look up stuff occasionally. Mostly internal class and stuff that are harder to remember. (Ex.: Point-Line projection math)

I learnt it all in skool!

:slight_smile: Actually it just depends on your learning style… everyone’s is different. Many people learn well in a structured classroom type environment such as university or classroom courses. Personally that type of structure never fit well with my learning process / style so, from a programming perspective, I did the majority of my learning through online tutorials and books on my own. I have also learned a tremendous amount on the job. As far as Unity specific, I’m pretty new to it as well but I’ve been doing the majority of my learning through tutorial videos like CGCookie and YouTube as well as through the learning resources on the Unity site itself which are actually quite good for a beginner. Once I’ve started to get a bit more comfortable I’ve started tearing apart code samples and writing some of my own.

Sorry haha, I just meant that I’m designing as well as coding and such (as some do), and it’s a little hard doing it all, very time consuming! Guess I should have made it clearer :stuck_out_tongue:

For the past 2 years I’ve been watching all kinds of tutorials about Unity and programming in general. Also I’ve read many other articles about programming, I do this on a daily base. I don’t have to look in the documentation anymore to find out how to do something, I only look to see which functionality is there that I can use. This, and a lot of actual coding helped me to get where I am now, I’m pretty happy with this new gained skill.

I learned by picking small projects. Seriously, when starting out, it’s easy to want to shoot for the moon, but really completing small projects is where it’s at. Stuff like Tic Tac Toe, Breakout, Turn-based card and puzzle games… This lets you avoid trying to learn everything about Unity at once!

Also, while you can pick up a lot just by experience, in my opinion it is super useful to take an Object Oriented Programming class and a Data Structures class or study about it from a text book or find a friend for some tutoring. In my experience, these topics are really hard to pick up without some direction.

Small scope for your projects. I can’t tell you how many half-completed (or less than half-completed) projects I’ve done. It’s never satisfying getting frustrated with a project and quitting! By doing the small projects first, you’ll learn more Unity techniques and can slowly move on to more complicated projects.

Well I started building my knowledge for coding with Batch :confused: Then I just jumped from language to language until I found Ruby, a lovely coding language if I have to say. I stayed with Ruby for like two years (I can still code with it) and then I saw I was getting limited, not by Ruby, but by the engine I was using, then I struck upon Unity. Since Ruby and Javascript (and C#) are object-orientated languages, coding with them gets really simple for an experienced coder. I check the documentation really often, quickread some short tutorials on Javascript and then just start experimentating.

That’s generally not how it works. For a programmer it is every day job to encounter new problems and find solutions to them.
When you learn programming you start by learning language. All it really does is tell you how computer “thinks” and how to translate your human thoughts into what computer will understand. Only after you are more or less fluent with that computer language you start picking up on abstract problem solving patterns that are often language independent (can be applied in many different languages).

EDIT: With time you will find yourself more and more independent from forums and tutorials, capable of solving new problems everyday on the fly.

Then there is off course technology specific knowledge like how to leverage Unity power in your code. Doing the Unity official tutorials on scripting will teach you both: programming and Unity technology itself. Never done them my self but they look pretty good.

EDIT: You will use Unity script reference everyday to check on Unity stuff you haven’t done before or to remind yourself of some crucial details on how to use things or how they work in Unity. Mostly people will post on forums when they can’t get something Unity specific to work or when they do not understand some specific aspect of Unity.

I don’t know about the UnityScript but JavaScript is not object - oriented. It is prototype - based. Slight variation from OOP but crucial.

EDIT: Looks like UnityScript is OO: http://wiki.unity3d.com/index.php/UnityScript_versus_JavaScript#JavaScript_is_class-free

My mistake, meant UnityScript >.<

I am 12, and I learned basically by trial and error.I started out by coding Batch, then to C, then to Objective C, then to Java, and now I am on Unity! (I also know HTML and a little bit of ruby) I would sit down and code four about an hour then I would go over my work trying to see why there where errors (There were lots :P) And I learnt from that, but to actually have someone teach you I would recommend Treehouse, it is free for on full lesson, and $25 for unlimited access to all tutorials, and I learnt the basics of JavaScript, Objective C, HTML, ruby, ect on there! Hope this helps!

I came into contact with web development when I went to high school. Took a bachelors degree in game development a couple of years later. At that time I had come in contact with a large selection of programming languages. I’m a professional developer since 3 years back. I play around in unity during my spare time.

I’ve reached a state in my programming abilities where I’m not limited by lack of knowledge. Writing code comes as naturally as writing plain English. Of course one still has to get familiar with APIs when working with a new framework. Luckliy Unity is extremely easy to learn.