Newbie Tips: What Language Should I Learn?

One of the most frequent questions I get from high school and college students, especially after they read my school article in GCG, is "What programming language should I learn?" Generally, I reply to this question privately over email, but I figure it's something that I should have written about a long time ago, so here it goes. The answer is… it depends.

Now, I'm sure everyone was thinking the answer would be C++, and for the most part, you're right. But you're thinking I get this question from ONLY programmers, and only programmers that are at the level where they'd be able to work with C++ and not get intensely frustrated. Certainly, all people looking to be programmers in the game industry MUST learn C++ and MUST learn it well. But I'm getting ahead of myself. We should first look at the different type of people that ask this question and first ask them a key question: What do you want to be in the game industry? The answer to this isn't always a game programmer. Believe it or not, some artists ask this question, and I don't blame them. The more technical skills any artist has, the better they're going to be at their job. So, I've broken this down into three groups:

Programmers

If you want to be a programmer, and I mean a "real" programmer, and you're at least fairly comfortable with a computer, I recommend you start with C++. A lot of people are going to yell at me for this, because they think C++ is prohibitively hard to learn, that it's on its way out, that it will be taken over by more interpreted languages like Python or C# and that a programmer learning C++ is wasting his or her time. I don't buy it. Almost all AAA game companies still use C++ when it comes to systems level programming, and I don't see that changing any time soon. And even if I did, I'd still recommend C++. Why? Because you are always more comfortable in the language you start in, and C++, through its many idiosyncrasies (and, honestly, poor language design) forces you to think about things like memory management, simple optimizations, side effects, const variables, const methods, references, pointers and (as you get more and more advanced) things like v-tables, performance of virtual methods, memory layouts, and memory trashing. More modern languages do all they can to protect you against some of this stuff, but even they have weird performance pitfalls that, unless you have a sound basis in "close to the metal" programming, you won't fully understand and that you won't be able to optimize away.

In addition, many, many languages, are based off of C++ in some way shape or form. Regardless of whether they carry over any syntax or keywords, far too many languages are classified as "C-like" (including many scripting languages) for you to ignore it and think you'll be able to slide by without a full understanding of it.

That said, if you're in middle school or early high school, I will say there is no problem learning other languages that make your programming life easier, like VB, Python & PyGame, DarkBasic or C#. By the time you hit college, through, regardless of whether your school teaches it or not, you should be learning C++ on your own and some of the libraries that are used in game development with it (either OpenGL and / or DirectX, with a smattering of Win32, just for fun ;) ).  Just be aware that if you're starting in a higher level language, that you may be forming some bad habits that may end up being hard to break.

Designers

Okay, so you want to be a designer. Join the club. Now, everyone wants to be a designer, and my advice for this was, not too long ago, think of something else to do. That is no longer the case. I now believe you can become a designer in the industry, just not the role some people think (aka, not the person who comes up with the idea for the game in the first place). Regardless, I won't go into detail about this in this article, suffice to say most designers should learn programming in some form. My recommendation is to learn the languages you will most likely use on a daily basis, and those are the languages that are used to automate tasks in Excel. This means VBA and VB.NET (and / or C#). You will be surprised just how powerful these languages are, and how much more effective you will become at working with Office after having learned them.

If you're really adventurous, you may also want to learn a scripting language like Lua or Python, and learn a game making framework like PyGame. Why? Well, cause, then you can make your own games pretty easily, and that's what you wanted in the first place right?

Artists

For your run of the mill artist, I say learn two languages: MaxScript (for obvious reasons) and Python. Unlike MaxScript, Python is actually used in other places than art, and is a more fully featured language. However, it's also integrated into most art tools, including Maya, so you waste no time by learning it. As a bonus, Python has PyGame, which means if you have even the slightest understanding of Python you can actually make your own games without programmer assistance. And if you can do that well, I hate you, as I have no art skills what so ever.

I also recommend that artists at least take a look at C#, as many game companies are starting to integrate C# into their tools pipeline, and a smart tools engineer will find ways to allow small C# "scripts" to be run on top of their tools (this is actually very easy to do, though it takes a bit of forethought in the tool's design, but I digress). Anyway, learning the language won't hurt you, and may help as C# becomes more common.

What about…

So, many people will read this and wonder what happened to their favorite tool or language. Flash and ActionScript in particular are missing, as are the scripting languages for tools like GameMaker. Well, in my mind these are specific tools, and if you want to use these tools (or you're forced to use these tools), then obviously you will have to learn their languages. The good part is that, as you learn programming languages, it becomes easier to pick up other programming languages, and the ones that I've mentioned as places to start are all languages that will give you a firm enough basis that you should be able to pick up other languages easily. I don't see the purpose of learning a specific language first. Their applications are so limited that their practicality is diminished.

So I hope that answers the question about what language you should learn. Hopefully this helps point some people in the right direction. Good luck everyone!

3 Comments

  • June 16, 2009 - 4:14 pm | Permalink

    Good posting. You are making me rethink a lot of my rethinking of our curriculum, if that makes sense…

  • June 30, 2009 - 8:47 am | Permalink

    Hi Jeff, great article! I stumbled upon your site while trying to find your email address in order to follow up on our brief meeting at the Beta House Game SIG event last (?) week. Anyhow, I’ve managed to become a producer at a studio but haven’t done any programming for 4-5 years, so I’m looking to get back into it and this seems like great advice. I knew a variety of languages 4 years ago, including C++, but that’s long gone now, and my boss suggested getting back into it with AS3, but I’m now realizing that to make my video game dreams come true, I need to buckle down and re-learn C++ as well. So, thanks for the advice! It was great meeting you the other day!

  • October 3, 2009 - 12:55 am | Permalink

    According to me you should learn ASP.Net because it’s such a very powerful and secure language among all the language and my advice you have to learn ASP.Net. You can create very string application using the ASP.Net..

  • Leave a Reply

    Your email address will not be published. Required fields are marked *

    *

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>