Languages to learn

Discussion in 'I wanna be a Game Programmer' started by Suiken, Apr 16, 2007.

  1. Suiken

    Suiken Lurker Not From Round Here

    To break into the industry (and eventually climb up than ladder rungs), which programming languages should I learn/focus/specialize? Just some general guidelines would be nice, and listing off less important but still useful languages would be helpful too.

    (And that goes for lingual/literal/technical languages)
     
  2. ilian

    ilian Gaming God One Of Us

    absolute must: c/c++

    for graphics:
    hlsl


    other helpfull languages:
    C# -- many tools are being done in this now.
    Perl -- many tools are done in this
    LISP -- many scripting languages are based on this.
     
  3. Madcat

    Madcat Gaming God One Of Us

    • English (spoken, written)
    • C++ (primary runtime coding language)
    • Lua (popular runtime scripting language)
    • Python, Perl (popular pipeline/tools languages)
    • C# (popular GUI tools language)
    • Intel/PPC assembly (handy for debugging, and spot optimisation)
    • Cg/HLSL (graphics coders only)
    • ActionScript (used at some studios for front end programming)
    • Mel, MaxScript (for writing scripts in Maya and 3DS Max)
     
    • Thank Thank x 1
  4. Suiken

    Suiken Lurker Not From Round Here

    Ah, thanks a lot guys. I'm currently learning C++ right now, and I guess I have a long ways to go.
     
  5. YourMumsLesbianLover

    YourMumsLesbianLover Gaming God One Of Us

    Of the languages listed that you will commonly need, c++ is about the lowest level and most complicated there. Once you are proficient in C++, learning other languages to an acceptable degree takes very little time - especially the simpler scripting languages like MEL and MaxScript.

    So basically, don't fret if it looks like you have a long way to go. The most important things you need to learn are the principles of how to write code and more general things about how computers work.

    Dunno about assembler though. I couldn't really ever do it as it was too low level... I'm an artist now anyway, so maybe you should just ignore my advice ;)
     
    • Thank Thank x 1
  6. Mr Fish

    Mr Fish Industry Professional One Of Us

    Also learn an assembly language, it will make you appreciate what goes on under the hood, and after that other languages become easier. You'll probably never use it, but you'll have some fun, I know I did 20 years ago when all games we 100% assembler (well apart from the very rare one).

    Of course no one appreciates it nowadays, and you always get a mightier than thou attitude from the young 'uns who think it is beneath them... Never knew they were born...
     
  7. m_hael

    m_hael Professional Coffee Drinker One Of Us

    they do that until you take their nice simple C++ code thats eating up 10% of the CPU and, knowning how the hardware will best react to it, rewrite it with some nifty asm like tricks that result in it dropping off the 1%+ list altogether.

    learning how the hardware/compiler handles your code is extremely useful if you're planning on writing fast usable code; something that implements everything under the sun but runs like a bag of shit will never be used in an environment where speed is required.

    to that end I'd say you have a decision to make.

    if you're planning on implementing "game" code, how the player reacts, how he moves, what animations he plays then C++, the scripting basics are your best bet.

    if you're planning on implementing "system" level or other "low" level code, AI libraries, math libraries, low level rendering code, filesystem that kinda thing then C++, C, ASM, HLSL, CG are where you need to concentrate.

    if you're working on anything/everything else then you'll likely need a good grounding in C, C++, C# and a mix of scripting languages.

    it should be noted that most programmers (probably >90%) do not learn assembly to any degree.
     
  8. Suiken

    Suiken Lurker Not From Round Here

    That sounds good. I think I'm starting to understand all that stuff. Are there any really good resources that I could refer to?

    Wait, does that mean that games use multiple language simultaneously? That sort of boggles me. :confused:

    I do want to thank all of you for the advice and info. I really appreciate it! :)
     
  9. m_hael

    m_hael Professional Coffee Drinker One Of Us

    apologies for the confusion... a generalised breakdown would be

    "most" game code is in C, C++,
    "some" games use C,C++ code to interpret scripts written by other programmers or designers/artists

    "some" low level code is written in pseudo assembly (intrinsics) or pure assembly (thats phasing out for the most part), hardly any low level code is written in C++.

    "some" tools are written in C#, some in C, some in scripts, some a combination of scripts & C,C++.

    a good grounding for any development is C, C++
    better would be C, C++, and some scripting
    better still...C, C++, several scripting languages, some asm.

    experts tend to know a couple of languages to expert level and the others on a merely average level.
     
    • Thank Thank x 1
  10. m_hael

    m_hael Professional Coffee Drinker One Of Us

    consider the final program to be like a large website, the pages can reference each other but need not be written by the same person or written in the same language. The only thing that matters is that each page uses the data it sources correctly and any links between pages are setup properly.
     
    • Thank Thank x 1
  11. dan_olson

    dan_olson Totally anonymous One Of Us

    Yeah... learning how to program (well) is more important than learning the specifics of any given language, though proficiency in the language(s) used by various companies is a must. All the algorithms knowledge in the world isn't going to help you if you don't realize you have to use delete[] on stuff you allocate with new[]. (I reviewed tests for some apps recently, not very many got that one right. :()

    So, good references for "how to program"... they're all kind of college level textbooks it seems like. Intro to Algorithms by Cormen, Lerner, Rivest and Stein (I think I got all those right). Find something about data structures. Find stuff about structured programming, object oriented programing (most C++, Java, or C# books will have a section on that), functional programming (this isn't used as much in the game industry), generic programming, design patterns. All that kind of stuff.

    I'm sure all of this is a bit overwhelming. Start with one language (C or C++ is good, IMO, because you can't entirely ignore what's going on under the hood) and learn to do stuff in it. Implement some algorithms, write some cheap little throwaway programs that amuse you. Make sure you understand how and why things work the way they do. Then start looking into other languages. Assembly is a slightly different way of thinking... if you want to be kind of modern maybe optimize some of your algorithms with MMX/SSE to get a bit of a feel for it.

    Once you're well-grounded, it's pretty trivial to learn a new language or library or set of intrinsics. People in the game industry need to learn new things all the time. The better you are at learning, the better programmer you'll be.

    :confused::confused::confused:
    That's either a typo or a very broad generalization.
     
    Last edited: Apr 18, 2007
  12. Unsurprised Jack

    Unsurprised Jack Industry God One Of Us

    Write a scheme interpreter in lisp, and then write a tail recursive scheme compiler in lisp that runs on a virtual stack machine. Lots of really great learning experiences there.

    Learn Haskell next.
     
  13. Brian Beuken

    Brian Beuken Boring Old Fart One Of Us

    C++ is the dominant language in the games industry and will be for some time yet, C by virtue of being part of C++ comes with that. Plain old C is not used as much as it used to be, though it's still around (Nintendo coding for example, "tends" to be more C based becuase of the libs and demo's supplied), when you learn C++ chances are you'll start off learning C and gradually introduce some of the C++ ideas into your thinking.

    My honest opinion is to ignore all other languages, people tend to veer away from C++ when they are experienced enough to understand some of it's limits (which tbh are not that many) or get bored with C++, thats cool, each to their own.
    But when you're starting out, it can be very hard to understand what the hell is going on with your programs and you need to get that understanding as quickly as possible so stick to that 1st step, learn C/C++, write programs, any programs, type them in from the tutorials you use, mess with them and then buil up on them, keep writing programs until it becomes 2nd nature and you start to think about problem solving in terms of how you would contruct a bit of code.

    Once you have that basic skill, learning other languages comes much easier because depite differences in syntax and methodolgy all programming is about doing the same thing.
     
    Last edited: Apr 18, 2007
  14. Mathematix

    Mathematix Banned

    Nothing was mentioned about education. If you have the time and money try your best to nail a computer science degree from a good university. It will teach you the theory required to give you a massive head start when learning to program games - especially if you decide to also go down the asm programming route.

    Good luck, mate! :D
     
  15. YourMumsLesbianLover

    YourMumsLesbianLover Gaming God One Of Us

    Hmm, like I said before I'm not an expert, but it might be worth getting hold of a copy of Code Complete.

    http://www.amazon.com/Code-Complete...6445748?ie=UTF8&s=books&qid=1176895212&sr=8-1

    Does deal with a lot of common sense things, and actually I never bothered to finish reading mine because I got it around the time I graduated,but I've heard good things about it. We have a few copies at work and the boss tells all graduate programmers to have a look at it when they start. It's available in several languages too :)

    Anyway, that's a good general book for good programming practices, but there are tons of more specific books out there dealing with graphics, game programming, maths etc. that are worth a look too.

    BTW, thanks for the thanks... it was my first time :)
     
  16. yaustar

    yaustar Industry Professional One Of Us

    For the current generation, C++ is the language to learn although most companies are (if not already) shifting towards scripting languages such as Lua or Python for gameplay systems and anything that isn't performance critical purely because development time in higher level languages is generally smaller.

    Code Complate and/or Pragmatic Programmer is a must read for the 'mindset' or practises of a programmer.

    I have a whole bunch of links in one of my 'articles' on my Blog.

    Quite frankly, once you have learned one paradigm, switching language to one of the same paradigm is a matter of learning new syntax most of the time.
     
  17. Suiken

    Suiken Lurker Not From Round Here

    I'm finishing up my first year of college (and yeah, I'm working on a BS in CS)
    I'm working with C++, and I think I'm starting some C next fall.

    Deviating from the language topic slightly, what could I work on now (in my free time) that would give me some experience/insight into what I should expect if I move into the industry? (i.e. make a demo of some sort/make a mod for something) (Oh, and also, how would I go about doing that?)
     
  18. yaustar

    yaustar Industry Professional One Of Us

    The best thing you can do is work on something in your own time. Almost all developers will ask you if you what you have done project wise outside of academic environments.

    In general, this can be anything but hopefully specific to the area of programming you want to be in. Eg a renderer for Graphics discipline.

    The best thing that can give you experience or insight is to join a project to produce a game (see Help wanted on GameDev.net) as a 'junior programmer'. Something like this would give you a decent portfolio piece and give an indication (if the project is run correctly) of the tools, process to completing the project. This should include use of source control, code reviews, working with other's code etc.
     
  19. Brian Beuken

    Brian Beuken Boring Old Fart One Of Us

    Write anything you like but the key thing is to not aim too high and become pissed off when you can't reach your over optimistic goals. Forget about MMO's or other nonsese..get the basic right...Programming is easy when you know how, but it's bloody hard when you don't and even when you are really good at it, there's still a lot more to learn.

    tic tac toe is taught at almost overy college programming course for good reason, its a simple game that you can expand on. Try that 1st.

    Failing that, I have a tendancy to write pac man when ever I'm learning a new language or system, not that I have any particular love of pac-man (well maybe a bit) it just has so many of the simple basics in place athat you are not worrying about the game play, you're worring about how to impliment it, dont try to design something new...try to write something you are familiar with and understand.

    1st 3D thing should just be a simple affair,, best to use an engine there's a lot of free ones around (OGRE for example is now very good indeed), avoid direct low level OpenGL or DirectX until your comfortable with the way things work in 3D. Engines deliberatly take away a lot of the niggley stuff in the lower API's but you should still try to understand what's happening.

    So dabble in OpenGL or DX when you feel up to it and put some cubes and stars in space, learn about cameras lights, texures, build sky boxes, then terrains etc...then forget all that, becuase unless you want to specialise in engine building you'll never have to get into the hardware again, but knowing how it works will stand you in good stead later when you are trying to debug code.

    As for how would you go about that...buy a book, buy an IDE (or use VC++ express it's free), and take one step then another..there's no quick way, and no on here will be able to give you an exact answer...work at your own pace, and build on what you learn.
     
    • Thank Thank x 1
  20. yaustar

    yaustar Industry Professional One Of Us

    That's a point, how much experience do you currently have in programming and C++ Suiken?