Jump to content

  • Log In with Google      Sign In   
  • Create Account

Which language should i choose?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
22 replies to this topic

#1 Max_spectra   Members   -  Reputation: 102

Like
0Likes
Like

Posted 03 November 2012 - 11:28 PM

I've had the dream of becoming a video game developer/ programmer for a while now, and wanted to know which language should I learn for video game programming. I have a few books on C++, java, and python, but I dont know which one to start with. Please give your opinions, choices, and advice on the language and other things I should choose.

Sponsor:

#2 jbadams   Senior Staff   -  Reputation: 18620

Like
4Likes
Like

Posted 03 November 2012 - 11:43 PM

"I want to be a game developer... now what?"

Ultimately it isn't hugely important; programming languages are just tools, and if you follow through and become an experienced developer you will end up using a huge range of languages throughout your career. After learning your first language, and more importantly the underlying concepts of programming, it becomes significantly easier to learn additional languages as needed, and a skilled programmer can pick up a similar language in a couple of hours and will usually need only around a week to become familiar with a very different language from those they already know. Remember that your choices are not forever, and that the most important thing is to choose any language and actually get started.


That being said, given the choice of Python, Java or C++ I would probably rank them in that order of preference. I usually recommend beginners stay away from C++ because it can have a steeper learning curve and is often considered more difficult, and usually encourage higher level languages such as Python because they will allow you to concentrate on the fundamentals of programming and game development without having to worry about so many of the nitty-gritty details of memory management and weird errors that can be difficult for a beginner to understand and solve.


Do you have any programming experience yet, or are you starting from scratch?

#3 Max_spectra   Members   -  Reputation: 102

Like
0Likes
Like

Posted 04 November 2012 - 12:01 AM

I don't have any experience yet. i've just been looking at a few books and wanted to know where to start.

#4 SciBerC   Members   -  Reputation: 102

Like
0Likes
Like

Posted 04 November 2012 - 12:45 AM

C# or Java are both really good languages to program in, python is a great language too, I recommend python or C# for developing your first game, even if the game is crap.. There is so many tutorials on C# and python on youtube, once you feel a little more confindent with c#/python start learning C/ C++. With C# use the XNA framework, with Python use the PyGame framework, with C/ C++ use opengl/ directx and with C++ use the sfml framework.

#5 Yrjö P.   Crossbones+   -  Reputation: 1412

Like
0Likes
Like

Posted 04 November 2012 - 04:59 AM

Java is a clunky, unwieldy language. If you already knew Java, it would be fine to use it for game dev, but I don't consider it a good language for learning programming in general, nor is it a good language to learn specifically for game dev. There just are better choices out there.

C++ is reasonably productive when you are already very proficient with it, but it is very hard to get good at. I started with it myself but would strongly recommend against going that route.

Thus, go Python. It's just good. Even if you wanted to use another language later, you would still benefit because you could keep using Python for game scripting, as glue code, to make small tools for your build and testing and analysis processes, etc.

#6 debarra   Members   -  Reputation: 121

Like
0Likes
Like

Posted 04 November 2012 - 11:19 AM

I started out with Python. It's easy to learn, user-friendly and there is plenty of tutorials to help get you started. I would recommend using it with PyGame for game development. PyGame is a very good starting API to use.

http://www.pygame.org

Then I would learn Java if I were you, once I had a firm grasp on game programming of course.

Edited by debarra, 04 November 2012 - 11:20 AM.


#7 NathanFR   Members   -  Reputation: 114

Like
0Likes
Like

Posted 07 November 2012 - 07:33 AM

Java is bad language for learning programming? Hum... i don't see why it would less good than C# or Python to learn programming. I'm interested to hear your arguments about that.

If you don't care about starting learning programming with low level languages to get a better understanding of how memory and system work, go with Java would totally fine and it would even be better than Python. I love Python, i used it for game development with PyGame during a while when i was getting started but i ran quickly in performance issues. Python/PyGame couple is good to start but i don't think it's a serious choice for more ambitious games. Of course Python is user friendly, you can make games super quickly once you are familiar with it and PyGame but you will end up writing C code each time you will need a bit of performance, and trust me, it's annoying.

Today i'm considering PyGame as a really slow library but other tools exist, for example, for 3D games, Panda3D seems to be really nice (i only played a bit with the example codes).

Edited by NathanFR, 07 November 2012 - 12:45 PM.


#8 J. Evola's Apprentice   Members   -  Reputation: 307

Like
-1Likes
Like

Posted 07 November 2012 - 07:55 AM

Max_spectra: it depends on what kind of games you want to do. AAA titles are generally written in C++ (C and assembler in good, old days), so it has to be best language for programming spectacular games.

#9 Telastyn   Crossbones+   -  Reputation: 3726

Like
0Likes
Like

Posted 07 November 2012 - 09:13 AM

Max_spectra: it depends on what kind of games you want to do. AAA titles are generally written in C++ (C and assembler in good, old days), so it has to be best language for programming spectacular games.


Correlation <> Causation

In the 90's Python and Java were not practical alternatives due to lack of adoption and library support. Since then, support for consoles have been of utmost priority for non-MMO AAA games. Those consoles can't support Python and Java, thus (often crippled implementations) of C++ are used.

#10 jbadams   Senior Staff   -  Reputation: 18620

Like
1Likes
Like

Posted 07 November 2012 - 12:20 PM

Max_spectra: it depends on what kind of games you want to do. AAA titles are generally written in C++ (C and assembler in good, old days), so it has to be best language for programming spectacular games.

The reasons of professional developers do not (usually) apply to you.

Whilst AAA developers have good reasons for choosing C++ in many cases, it can be a mistake to blindly follow after them without understanding the reasons and making your own decision. In many cases some of those same professionals would actually love to use another language, and if the reasons they were forced or lead towards C++ are not relevant to you there's no reason you need to also choose it.

Don't get me wrong -- C++ is a fine choice if it's the language you prefer and/or you have your own good reasons to choose it -- but it's a mistake to think that because professional developers choose it it must also be the best choice for you. Your situation is very different to theirs, and the reasons they chose it will probably not apply to you.

(Posted from mobile.EDIT: Fixed up formatting from a PC.)

Edited by jbadams, 07 November 2012 - 04:30 PM.
: Adjusted formatting.


#11 NathanFR   Members   -  Reputation: 114

Like
0Likes
Like

Posted 07 November 2012 - 12:51 PM

In conclusion, go with the language you want, the one you feel the most comfortable with and just write a game. As @jbadams said, when you will get a bit experienced at programming, changing language regarding your requirements would be quite easy. What you want right now is writing games to get experienced in general programming logic and general game development logic, both are language agnostic.

Have fun.

Edited by NathanFR, 07 November 2012 - 12:52 PM.


#12 AllEightUp   Moderators   -  Reputation: 4212

Like
-1Likes
Like

Posted 08 November 2012 - 01:01 AM

That being said, given the choice of Python, Java or C++ I would probably rank them in that order of preference. I usually recommend beginners stay away from C++ because it can have a steeper learning curve and is often considered more difficult, and usually encourage higher level languages such as Python because they will allow you to concentrate on the fundamentals of programming and game development without having to worry about so many of the nitty-gritty details of memory management and weird errors that can be difficult for a beginner to understand and solve.


Unfortunately this order is also pretty much backwards to hiring priorities in the games industry if games is the target job. On many trip A games, I don't think I've ever hired a Python programmer, pretty sure I've only hired Java programmers because they were good and were able to learn the C/C++ code and of course I focused on C/C++ folks as hires. Java folks were usually brought in as Juniors at best, no matter their experience, Python, as stated, never hired one to my knowledge unless they had the Java/C/C++ skills.

I've been making games for a long time and unfortunately the only time I consider Python programmers is if I should refer them to the web or script teams. I don't consider them for game programming positions. Maybe I'm too old school but in general my priorities are C++/C#/C/Java, in that order. I only include Java as a proof of ability to program, I never hire such folks as anything but a junior programmer and expect them to pick up C++ in a hurry. Unfortunately, I've ended up firing most of the Java folks, they just don't usually figure out memory management requirements.

So, 20 years of making games says I disagree pretty completely with your ordering of priorities. If I were a website maker, maybe your order or priority would make sense to me. Unfortunately I make games for a living and your priorities are completely backwards to mine.

#13 jbadams   Senior Staff   -  Reputation: 18620

Like
2Likes
Like

Posted 08 November 2012 - 01:22 AM

So, 20 years of making games says I disagree pretty completely with your ordering of priorities.

Fair enough -- and you've raised some valid points -- C++ knowledge is practically required for the overwhelming majority of AAA development jobs, and it's a language anyone wanting to get into the industry should learn. There are however two assumptions in your advice that don't necessarily hold true:
  • That the original poster will only learn one programming language. I don't know about you, but I've learned numerous languages during my career, and many of the highly experienced C++ developers I know started out with variations on BASIC, Hypercard, etc. When I recommend Python or C# I fully expect that it will only be a first language, and others will be learned as needed -- this is precisely why I initially spent time explaining that the choice of language wasn't particularly important and that the underlying concepts should be the initial focus; everyone learns differently, and some people swear by C++, but personally I think it's easier to learn many of those underlying concepts without having to deal with the additional complexities of C++ -- anyone wanting to get a job in the games industry should then proceed to learn C++.
  • That the original poster wants to work as a AAA developer. While this possibility isn't unlikely, there are plenty of non-AAA game dev jobs that don't require C++, and hobbyist or indie developers are free to choose any language they like. If AAA development isn't the goal then C++ might not be required at all, but in cases where it is needed it can usually be put off and approached as a second or third language.


#14 SimonForsman   Crossbones+   -  Reputation: 6112

Like
1Likes
Like

Posted 08 November 2012 - 01:23 AM

I've been making games for a long time and unfortunately the only time I consider Python programmers is if I should refer them to the web or script teams. I don't consider them for game programming positions. Maybe I'm too old school but in general my priorities are C++/C#/C/Java, in that order. I only include Java as a proof of ability to program, I never hire such folks as anything but a junior programmer and expect them to pick up C++ in a hurry. Unfortunately, I've ended up firing most of the Java folks, they just don't usually figure out memory management requirements.


You actually hire programmers who classify themselves as <insert language here> programmers for junior positions ?
For senior positions it might be good to get a candidate with expertise in a specific language(the one your company is primarily using) but for junior positions I prefer to see candidates with a broad and solid base. (A candidate who only knows C or its derivates can't be all that interested in his craft).

For me personally C++ was my fourth language, Python fell in at 15+, There are still a whole bunch of languages out there that i know i should take a closer look at.

Edited by SimonForsman, 08 November 2012 - 01:48 AM.

I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

#15 rnlf   Members   -  Reputation: 1123

Like
1Likes
Like

Posted 08 November 2012 - 01:50 AM

I totally agree with jbadams. Many people I know tried to learn C++ as their first language, got frustrated and quit. And of those who made it through, many had adopted so many bad practices that it took them at lot of time to get rid of them.

If you want to learn modern programming, go with a language that makes it easy to learn modern concepts. Once you understand the concepts, go to an expressive language like C++ and see how to apply these concepts to it. It is easy to hack together a solution in C++, but it the easy way in C++ is likely to be either wrong, slow, dangerous or all of them.

I am programming C++ for about 15 years now and I still trip up on some of its details more often than I wished I'd do. And without a solid programming base, you will not even notice you're stumbling until it's too late and you have to do a few weeks worth of work again.

So, while C++ is still my language of choice, it is a bad language to start your programming training with. I recommend Python, it is easy, less error-prone and supports more or less every modern programming concept.

my blog (German)


#16 AllEightUp   Moderators   -  Reputation: 4212

Like
0Likes
Like

Posted 08 November 2012 - 02:11 AM


So, 20 years of making games says I disagree pretty completely with your ordering of priorities.

Fair enough -- and you've raised some valid points -- C++ knowledge is practically required for the overwhelming majority of AAA development jobs, and it's a language anyone wanting to get into the industry should learn. There are however two assumptions in your advice that don't necessarily hold true:
  • That the original poster will only learn one programming language. I don't know about you, but I've learned numerous languages during my career, and many of the highly experienced C++ developers I know started out with variations on BASIC, Hypercard, etc. When I recommend Python or C# I fully expect that it will only be a first language, and others will be learned as needed -- this is precisely why I initially spent time explaining that the choice of language wasn't particularly important and that the underlying concepts should be the initial focus; everyone learns differently, and some people swear by C++, but personally I think it's easier to learn many of those underlying concepts without having to deal with the additional complexities of C++ -- anyone wanting to get a job in the games industry should then proceed to learn C++.
  • That the original poster wants to work as a AAA developer. While this possibility isn't unlikely, there are plenty of non-AAA game dev jobs that don't require C++, and hobbyist or indie developers are free to choose any language they like. If AAA development isn't the goal then C++ might not be required at all, but in cases where it is needed it can usually be put off and approached as a second or third language.


As to #1- most definitely true. But I say that if you want to make games,your 90%+ best path to success is C++. It is not that I'm a fanatic lover of C++, it's just the language of choice for 90%+ all game creation. (It's probably higher, but have to give MineCraft a times 100 weight. I'm a fan. :)) I am personally fluent in way too many other languages and have learned pretty much every language enough to write "hello world" and at least something a little more involved because I LOVE programming and am always looking at ways to be lazy by finding more appropriate solutions. :)

What I disagree with is the idea that C++ is so difficult to learn that other languages are preferable starting points.Take any "C for dummies" book and you can learn the book even though your compiler is actually C++. Confusing C++ high level complexity as meaning the language as a whole is to obtuse to start with is just wrong in my thinking. The other argument is that with C/C++ you can't do graphical systems easily where Python and Java have OS independent wrappers around such things. Well, in the case of Python, WxWidgets is PyWidgets adapted to Python, Swing, well that's a pure Java thing but I'd say that QT is comparable if not massively better. (Yeah, QT is available for many languages including Python and Java.)

So, I find the idea of avoiding the most used language as counter productive. Yes, more complicated as you move forward, but it is knowledge of such complications which often wins a job in a smallish market. "Knowing" C/C++ but being a primary Java guy will get you a job at any number of web companies, it won't get you a game job though.

As to #2- I didn't mean to suggest that trip A was the only way to go. I mean that EVERY game is shooting for trip A and they always want the best devs they can get. Lets say the company is hiring and they want programmers for some X game. If they are using any premade engine such as Source, Doom or UnReal, they will be looking for C/C++ programmers. (NOTE: UnReal, they will also be looking for Java like programmers for scripting.) Any other solution and they will almost always be looking for C/C++ because they have to write something from scratch. This is not a 100% thing, just the "most common" thing.

Disclosure: I absolutely despise Java as a language, lack of unsigned and no pass by reference unless in a struct, pisses me off to no end.

#17 Washu   Senior Moderators   -  Reputation: 5200

Like
2Likes
Like

Posted 08 November 2012 - 02:27 AM

What I disagree with is the idea that C++ is so difficult to learn that other languages are preferable starting points.Take any "C for dummies" book and you can learn the book even though your compiler is actually C++. Confusing C++ high level complexity as meaning the language as a whole is to obtuse to start with is just wrong in my thinking. The other argument is that with C/C++ you can't do graphical systems easily where Python and Java have OS independent wrappers around such things. Well, in the case of Python, WxWidgets is PyWidgets adapted to Python, Swing, well that's a pure Java thing but I'd say that QT is comparable if not massively better. (Yeah, QT is available for many languages including Python and Java.)

Any C for Dummies or similar book is usually the worst possible starting point. I've never seen one of those books that got it right, or even close, to how things actually operate in the language. C++ is a huge complex beast. We recommend newbies start off with more well defined languages, such as C# or Python, for the simple reason that C++ IS a huge complex beast with plenty of trivial undefined behavior. The goal of a new programmer is not to learn a language but to learn the principle and practice of PROGRAMMING, i.e. problem solving, data structures, algorithms, and the associated bits and pieces of knowledge that goes with that. Learning those things in a language like Python, or C# is significantly easier than doing it in C++, and thus will allow the novice programmer to advance their knowledge and build ACTUAL WORKING programs faster than they would be able to in C++. This encourages and keeps the novice programmer's attention, thus furthering their education.

At no point do we suggest that new programmers should restrict themselves to a single language. Any GOOD developer will learn many languages over time. Starting out with an easy to work with and learn language provides many advantages over starting with the hardest possible language to pickup.

Edited by Washu, 08 November 2012 - 02:29 AM.

In time the project grows, the ignorance of its devs it shows, with many a convoluted function, it plunges into deep compunction, the price of failure is high, Washu's mirth is nigh.
ScapeCode - Blog | SlimDX


#18 jbadams   Senior Staff   -  Reputation: 18620

Like
0Likes
Like

Posted 08 November 2012 - 02:37 AM

I can definitely respect that point of view. I still disagree, but I don't think either of us are really more correct than the other -- this is one of those situations where the right answer varies from person to person. Now that we've both clearly stated our points of view and articulated our reasoning hopefully the original poster can make their own decision.

Disclosure: I absolutely despise Java as a language

I don't actually like it either -- but I do think it's a fine choice for those who are comfortable with it and is perfectly capable of creating good quality games when used correctly.

Any other solution and they will almost always be looking for C/C++ because they have to write something from scratch. This is not a 100% thing, just the "most common" thing.

C++ knowledge is never a bad thing, but there are plenty of game development jobs where other languages are used. Tools and support scripts are often written in higher level languages. Many engines provide a higher-level scripting interface often utilising Lua, Python, JavaScript-like languages or custom scripting languages such as UnrealScript. Mobile games are often written in other languages such as Objective-C for iOS or Java for Android. Web-based and casual games -- some of which are created by big-budget professional teams -- are often developed using a host of higher-level languages.

C++ knowledge is invaluable, but knowledge of other languages will also very rarely go astray, and there are plenty of jobs available both in and outside of games.

#19 AllEightUp   Moderators   -  Reputation: 4212

Like
0Likes
Like

Posted 08 November 2012 - 03:32 AM

Any C for Dummies or similar book is usually the worst possible starting point. I've never seen one of those books that got it right, or even close, to how things actually operate in the language. C++ is a huge complex beast. We recommend newbies start off with more well defined languages, such as C# or Python, for the simple reason that C++ IS a huge complex beast with plenty of trivial undefined behavior.


What I disagree with is the idea that C++ is so difficult to learn that other languages are preferable starting points.Take any "C for dummies" book and you can learn the book even though your compiler is actually C++. Confusing C++ high level complexity as meaning the language as a whole is to obtuse to start with is just wrong in my thinking. The other argument is that with C/C++ you can't do graphical systems easily where Python and Java have OS independent wrappers around such things. Well, in the case of Python, WxWidgets is PyWidgets adapted to Python, Swing, well that's a pure Java thing but I'd say that QT is comparable if not massively better. (Yeah, QT is available for many languages including Python and Java.)

Any C for Dummies or similar book is usually the worst possible starting point. I've never seen one of those books that got it right, or even close, to how things actually operate in the language. C++ is a huge complex beast. We recommend newbies start off with more well defined languages, such as C# or Python, for the simple reason that C++ IS a huge complex beast with plenty of trivial undefined behavior. The goal of a new programmer is not to learn a language but to learn the principle and practice of PROGRAMMING, i.e. problem solving, data structures, algorithms, and the associated bits and pieces of knowledge that goes with that. Learning those things in a language like Python, or C# is significantly easier than doing it in C++, and thus will allow the novice programmer to advance their knowledge and build ACTUAL WORKING programs faster than they would be able to in C++. This encourages and keeps the novice programmer's attention, thus furthering their education.

At no point do we suggest that new programmers should restrict themselves to a single language. Any GOOD developer will learn many languages over time. Starting out with an easy to work with and learn language provides many advantages over starting with the hardest possible language to pickup.


It is not my fault that C for dummies isn't written correctly, perhaps we should write "C For Dummies which Moves to C++, The Book That Doesn't SUCK". ) The thing about C/C++ is basically similar to Perl. You can write things so many different ways that there is "no" best way. C# and the other languages propose coding standards beyond just a "language". C# is every bit as complicated as C++ in most ways, as a language, only the support libraries and implied coding standard really make a difference

So, with C#, I'm not really sure how C/C++ is really that much more complicated? The things which usually throw nubes are duplicated in C# in terms of the basic language, What is different is availability of support libraries, standard naming conventions, and all sorts of other things you have to go find/link into a C++ program.

So, "how" is C# in anyway more easy? Templates? Hmm, C# has generics with even more complicated rules as to derivation with all the "where" clauses and such.

I don't mean to be an ass here, just trying to question this in the best way I can, it does sound assish, sorry about that. :)

#20 AllEightUp   Moderators   -  Reputation: 4212

Like
0Likes
Like

Posted 08 November 2012 - 03:49 AM

I can definitely respect that point of view. I still disagree, but I don't think either of us are really more correct than the other -- this is one of those situations where the right answer varies from person to person. Now that we've both clearly stated our points of view and articulated our reasoning hopefully the original poster can make their own decision.


Disclosure: I absolutely despise Java as a language

I don't actually like it either -- but I do think it's a fine choice for those who are comfortable with it and is perfectly capable of creating good quality games when used correctly.

Any other solution and they will almost always be looking for C/C++ because they have to write something from scratch. This is not a 100% thing, just the "most common" thing.

C++ knowledge is never a bad thing, but there are plenty of game development jobs where other languages are used. Tools and support scripts are often written in higher level languages. Many engines provide a higher-level scripting interface often utilising Lua, Python, JavaScript-like languages or custom scripting languages such as UnrealScript. Mobile games are often written in other languages such as Objective-C for iOS or Java for Android. Web-based and casual games -- some of which are created by big-budget professional teams -- are often developed using a host of higher-level languages.

C++ knowledge is invaluable, but knowledge of other languages will also very rarely go astray, and there are plenty of jobs available both in and outside of games.


I completely agree, I'm currently doing mosty C# work right now. Go figure. :)

I'm not questioning the suggestions out of some perverse reason to be negative, I just question the "learning" bit which everyone keeps saying is easier in other languages than C/C++. Unfortunately, I've written language parsers and every functional language is "structurally" the same damned thing. Parsers for 10 languages and all I had to do was search for different keywords and symbols. (or tabs in Python)

I pose the question then, if the languages are basically the same with different displays, what makes it easier in one than another? I suggest it doesn't really make much of a difference except 2 things. 1 is memory managment, all other suggested languages are GC'd 2. is that most other languages include a lot more support libraries.

Have I missed something?




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS