What Language Should I Learn!? (C# or JavaScript)

I’m a 3D Animator / 3D Artist but I want to start learning to code with Unity, now i have basic programming experience I actually started out coding when i was younger but I haven’t done it for a while with any main programming language so I am well out of touch but i can however program in Maya’s MEL scripting language and ActionScript (Flash)

I am wanting to learn to code with Unity to develop some smaller games and just widen my skill base or at least be able to understand the way in which things are working within Unity so that I can help resolve issues allot better with a team and such bonuses like that but i’m stuck between what i should start learning as one one side I can go over the WalkerBoyStudios tutorials for JavaScript and it will be a consistent teacher the whole way through from learning the basics to making a tool for sprites and then a game using those sprites and for C# I know there are a few places i can get some tutorials from and such like the Hack Slash tutorials but that is where I have a little problem choosing

The Walker Boys teach you how to code properly from the understanding of the code all the way into examples of how to use it and then use it to function in a game

The Hack Slash teach you how to make a hack and slash explaining the code and why he has used it and how its working but I feel that it would be better if there was some sort of C# training laid out the way that The Walker Boys have done it but the only thing that frustrates me a little is having to go through those Unity basics to get onto the first proper project training lol

I know there are various other sources for learning to make games with Unity and C# but would someone present me with some information and opinions on what I should do, I know that there are a few books that I am currently going to go and look at in more detail and i will search this up a little more after this post is made but I would still appreciate any opinions and such on the language and why you think I should and or shouldn’t learn to code with it in Unity

A friend has mentioned that he loves using C# which is understandable and it is a common programming language from my understanding and he could help me out allot if i get stuck with things so that’s another bonus to starting out with C#

I have a few questions if you could answer and help me decide which route i should take and I know some may say why not take both but that’s because I will still be doing my 3d work and learning 2 languages as well as that isn’t a good idea in my opinion…

Q1. What is the main difference between the two languages if any?
A1. ???

Q2. Is JavaScript easier to pick up on?
A2. ???

Q3. Can you tell me some more learning resources you may know of? (2d or 3d Other than the default tutorials provided)
A3. ???

Q4. Are there any training series or tutorials laid out like The Walker Boys training but for C#?
A4. ???

Q5. What Do you think I should start with?
A5. ???
Please just copy paste the questions in that format and place the answer after A1. and so on Thank you!

Now I will be going over the tutorials provided by Unity but at the same time this wasn’t a post just asking for resource links for learning to program but your opinions on which language i should go for as well and I will most likely go through those tutorials at some point and the examples too…

Any feedback is much welcomed and greatly appreciated, I thank you all that read through the whole post I know it’s fairly long!!

Hi Patriik :slight_smile:

I am a self taught programmer, learnt the stuff cause I wanted to make games… starting on the Spectrum all those years ago.

I found Unity after playing with Torque and have never looked back or been to dissapointed.

Q1. What is the main difference between the two languages if any?
A1. I think this is really rather subjective… both work fine and really comes down to preference. In my case, I started with JS but then moved to C#. Not really sure why except two of the major packages I was using were written in C# so I decided to go that way, and really enjoy it as to me it makes a bit more sense than JS, plus everything has to be right for it to work. However, I understand that is not so much of a problem in 3.4 as JS has to be pretty exact.

Q2. Is JavaScript easier to pick up on?
A2. For me they were equal… no experience of either… about the same time for both.

Q3. Can you tell me some more learning resources you may know of? (2d or 3d Other than the default tutorials provided)
A3. Try this lot and these are all C# http://www.burgzergarcade.com/hack-slash-rpg-unity3d-game-engine-tutorial an excellent set of tutorials, VERY well explained and clearly outlined… in addition, the tutorials work :slight_smile:

Q4. Are there any training series or tutorials laid out like The Walker Boys training but for C#?
A4. see A3

Q5. What Do you think I should start with?
A5. If I was starting again, now, I would go straight to C#. One of the main reasons being, as I stated above, if yoiu get some of the more indepth packages and aids from the Unity store, you will find a chunk of them in C#. Whilst C# and JS scripts can be mixed in the same project, there can be issues with passing values between those scripts. If there is a common language, this becomes much easier.

Hope this helps…

Regards

Graham

Java would be easier… wouldn’t it?

Take a look at examples (if nothing else go through the scripting reference clicking random things to see the example code) of both US and C#.

If C# seems to make sense to you - go with it, it has tons of resources available.

If US seems that much cleaner, and easier (And C# horrible), then go with it for now. It’s normally easier to pick up.

C# is nicer… but requires you memorize a couple dozen extra rules - which is a lot for a beginner.

Personal experience:

Started in US, Moved to C#. Prior experiments - VB, AS, JS, Erlang etc.

Either. Just don’t waste time with polls and long posts.

A1. Main difference is limitation. There’s features in C# which JS cannot do and ultimately limit you to how you’d like to design your game.

A2. Its easier in a couple of ways, but the majority of the easier parts in JS result in lower performance or require you to pragma strict which when used basically there’s no difference in difficulty. JS is a bit less wordy for what its worth.

A5. C#. Theres no really important downsides to C#. The only downsides to C# come from unity’s implementation with file naming and all that means is you’ll have to make a new file for every script you need. Its like this to support JS i believe where its part of the language.

Warning - tech talk:

This only applies to multiple monobehaviours (and maybe other unity based classes), and is to (presumably) make D&D easier.

I’ve successfully put a monobehaviour and a normal class in the same document, as well as plain document with multiple classes.

This. Only one MonoBehavior per file, but you can have a MB and as many C# classes/structs/enums as you want in a single file without issue (which I regularly do).

Yea, I do this all the time. but was just commenting on the downsides/ abnormal stuff. Like if you picked C# up and then went to unity, its not completly obvious you have to name the monobehaviour / scriptableobject after the filename as if it were JS

Java and C# are pretty much the same thing with minor differences.

Most tutorials out there are in C#.

C# has support for code hinting etc in Monodevelop which makes learning a million times easier.

here’s my take on them.

Q1. What is the main difference between the two languages if any?
A1. C# is much more strict from what I’ve read and experienced. I also personally have more fun with it. Also, if you learn C# for unity it’s the real C# and will work, fundamentally, in anything else that supports C# (the Unity3D functions won’t work but the syntax, layout, and overall coding experience is the same).

Q2. Is JavaScript easier to pick up on?
A2. Technically, yes. It’s made to take out the extras from C#, such as namespaces, declaring public/private all the time, etc.

Q3. Can you tell me some more learning resources you may know of? (2d or 3d Other than the default tutorials provided)
A3. Tornado Twins, BurgZergArcade, Walker Boys, 3DBuzz (I think that’s them? they’re in the teaching section too).

Q4. Are there any training series or tutorials laid out like The Walker Boys training but for C#?
A4. Not that I know of.

Q5. What Do you think I should start with?
A5. If you have time, C#. BurgZergArcade’s tutorial series, don’t doubt just how effective it is. I’m on I think 107 or 108 or something like that, and I’ve learned so much. It might not seem like you’ll learn what you want for say an FPS game, but you’ll learn plenty. Such as OOP (Object-Oriented Programming), structures, classes. You learn so much because the tutorial series isn’t about making the most optimized game, instead he uses it to teach as much about scripting for Unity3D in C# as he can. and it’s fun to follow along with too.

C# is much better, hands down go with C#

C# is a programming language, US is a script language and please stop comparing US with Java, don’t know where you got this anyway ;)…
Most importantly, US is for Unity while C# and NET is THE programming language of the future for windows platforms… Of course if you don’t have windows, C# probably really only is useful for Unity (maybe) but then its still way better than US.

So on the surface with no prior programming experience, US is sure easier, but US is crap, like any other script language. C# is almost the perfect programming language in its latest version, as VS2010 supports, and since you don’t need to do low level stuff in Unity, it is also sufficient. So go with C#.
BTW, since lately, C# also has a lot of stuff previously only known to script languages, but supports it in a clean manner, like dynamic types, “var” keyword and the like.

Thank you to everyone who has provided me with their opinions and feedback on the situation. It will be C# that I go and learn