Coding Language To Use? (Newbie)

Hi All,

I have just started to use Unity3d and have really taken a liking to it so before I delve too deep to turn back I was wondering what programming language is best. Obviously they all have advantages and disadvantages etc but a book I am following is using Javascript but it seems like starting to learn c++ or c# would be more beneficial if I was to expand to other game developing programs. The latter seem to be more useful and I would be better off working with them rather then Javascript.

Anyway any thoughts on this?

Thanks

C#

Enough said.

5 Likes

(…crickets…)

+1

C# will make your life a LOT easier when the inevitable time comes that you need to communicate information between scripts.

1 Like

I don’t know that either C# or JavaScript is going to be any easier than the other to learn as a beginner… but as others have said, C# will make your life easier down the road.

Unityscript IS NOT Javascript. Pointless to learn that if you ever plan to do anything outside Unity. Learning C# will give you a much better foundation to work in just about any industry that needs a skilled programmer, not just game development. Once you learn C# for Unity, Unityscript is pretty easy to pick up, at least to the point where you can edit scripts which is good enough if you are using C# as your primary language.

1 Like

I don’t know if it’s pointless to learn as so much of the formatting and framework is the same as javascript. I don’t think anything is pointless to learn, actually.

the whole UnityScript/Javascript thing would be best clarified if unity were to replace the nomenclature they use throughout their entire documentation site… Unity - Scripting API:

That’s not likely to happen though, so I’m sure whenever someone uses the term “javascript” we can all just nod our heads and understand what they’re talking about. Consistency may be better than accuracy in some cases.

But personally, I would say that if you’re able to learn C# then you can pick up javascript pretty easily… and… if you are able to learn javascript you can pick up C# pretty easily. Hell if you can learn to program in one language you can learn to program in another language. All it comes down to is who do you want to spend your days with and “pick your poison”.

for me at first it was UnityScript…i been playing with Unity since 4.3,Just recently I switched to C#…to me its like a backward UnityScript, you know instead of var Player : GameObject; …its public GameObject Player;…I learned by converting all my UnityScripts to C#…some other things are different…the best way is to look at the samples in the scripting guide and switch between the JS and C#

Actually, it is, to the point I’d say it’s borderline deceptive to call call UnityScript ‘JavaScript’ at all.

UnityScript is a classical, strongly-typed language that uses .NET as its foundation, and has only been around as Unity has. It’s actually far closer to Google’s Dart language, than it is to Java/ECMAScript.

class Foo {
   var a : int = 5;
   function Bar() {
       return a + a;
   }
}

var Baz : Foo = new Foo();
Debug.Log(Baz.Bar());

Conversely, what we call ‘JavaScript’ is also known as ECMAScript, and is a prototypically-based, functional language. ECMA/Java-script has been a major web scripting language for over a decade. The two really are as different as can get, some similarities in syntax aside.

var Foo = function() {
    var a = 5;

    var pub = {};
    pub.Bar = function () {
        return a + a;
    }

    return pub;
};

var baz = new Foo();
console.log(baz.Bar());

EDIT: No, Unity Forums, neither of these examples are C#! Stop lying.

Look, I’m going to give the answer you don’t want to hear, but it is the truth whether you can handle it or not.

The truth is that whether you learn C# or Javascript (or Unityscript if you are so inclined), at the end of the day, if you are serious about game development and want to hone your skills to the best of your abilities, it doesn’t matter what language you learn.

It does not matter what language you learn. Say it with me. Ready? 3,2,1… It Doesn’t Matter What You Learn.

Because at the end of the day the actual skill that you are learning is programming.

While the following isn’t the most accurate analogy… Think of it like learning how to drive a wheeled vehicle. If you learn how to drive a sedan, and properly learn it, you can easily learn how to drive a minivan. You can easily adapt to a truck, and any other wheeled vehicle you can think of.

The truth is, if you are serious about this, in some time you will reach a point where you will be able to read code (and learn to write in a short amount of time) in virtually any language and be just fine.

So please, just choose one that you like and go with that, but learn it PROPERLY. Do NOT take shortcuts and just copy paste code that you think will work. If you don’t understand how something works, Look it up! I know it’s more fun to just make stuff happen, but trust me - that gets old real quick and you’ll hit a roadblock eventually where you can no longer move forward - because you won’t have the basics down, you won’t have the principles to move further than just making cool stuff happen. You won’t learn how to write a real game, if you don’t learn it properly.

Don’t learn a language. Don’t learn how to make random things happen by pasting code. Learn Programming. Do it

1 Like

This.

And OP, if you don’t have that good a foundation in maths, learn that too. Geometry, trigonometry and calculus should serve you well.

Haha yeah but let’s not overwhelm him! :slight_smile:

But seriously speaking - Maths, calculus, etc, DO NOT BE AFRAID of them even if you HATE Maths or are TERRIBLE at it. I failed Maths a lot at University (College if you are American?), and yet I found my performance or dislike of Maths to be completely irrelevant to how I feel about having to learn what little I needed to know for game development.

tl;dr: There’s really not a whole lot of Maths you have to know, and most of it is easily learnable. Learning to program effectively is much more important (and a slightly more difficult task ;))

Haha, but things will be much easier for the OP if he knows say trigonometry when working with a 3d engine that uses trig massively in functions and stuff. :smile: It’s a question of whether someone who knows trig will spend far less time fretting over vector3 manipulations than if the OP just goes blind and learns how to write a function. :slight_smile:

Lol u guys don’t know anything about code. Try Boo. Fastest and easiest language. Also, the majority of the code used by unity is Boo. On top of that, the name is coo(l). So yea… Boo…

No it isn’t… It’s C#.
[Kinda Obvious]

Lol bro plz. Boo. Its cool. Faster than checking a bool. While sitting on a stool. Wearing all wool. And relaxing by the pool. Better than going to school. And not being a fool. Because you know how to use a tool like boo.

No bro you listen to me.
C# is the way to be.
You don’t need to know how to play the harp,
You don’t need to catch a big ass mighty shark
To learn the awesome ways of C SHARP
You don’t have to break you head
You don’t have to jump on your bed
Debugging is a breeze, don’t use boo lest your heart will cease.

PS I suck at this…

If you switched to boo you would be “bootter” at it.

PS I was being sarcastic lol

1 Like

C# has applicability outside of Unity development, and will encourage better coding practices.

You would be doing yourself a disservice if you chose UnityScript over c#.

2 Likes