Sign in to follow this  
WazzatMan

Good Language choice for a wannabe pro game developer

Recommended Posts

WazzatMan    102
This basically relates to the whole C++ is obsolete issue... The reason I've started a new topic is that I don't think most of them really tackle the core of the issue. That is weather or not it's viable for a beginner to completely abandon C++ in favor of a high-level language like C#. Outside of Xbox 360, there's no other console in the World that supports code written in C#, and I've never even heard of a professional pc game made by a professional studio which uses anything but c++ and directx. You know, trying to convince people to use python/java/c# is fine and all, but what guarantee do they have that they can at least -hope- to get their foot in the door of a professional game studio? Take a look at the job list on this site, I haven't been here long but I've checked it every day and every day it's the same thing. Nothing there but requests for artists, C++ programmers and DS programmers, which I assume is still in C++. Maybe with Microsoft's history of getting what they want in the end, the Xbox will rule the World, C# will become just as fast as C++ (Without unsafe calls or calls to C++ dlls) and the industry will get a complete overhaul. But really, what are the chances of that happening?

Share this post


Link to post
Share on other sites
Telastyn    3777
If you don't know how to program, the chances of you getting even a whiff of a programming position is 0%.

Y'know... that's pretty much the long and the short of it. If you don't know how to program, you've no chance. Using C++ as the medium to learn how to program sucks.

So, what part do you think other threads didn't cover? What part of that assertion don't you the OP agree with?

Share this post


Link to post
Share on other sites
zer0wolf    1022
C++ is not obsolete. It is robust, expressive, and downright powerful. The problem is that it simple isn't beginner friendly and just isn't as efficient as C# or Python for rapid development.

I whole heartedly recommend a beginner start with a language such as C# or Python because it allows them to learn software engineering concepts without having to worry about pitfalls such as complicated memory management, and be productive while they're at it.

Yes, pretty well every modern console has you developing with C++ because that is what the companies (Microsoft, Nintendo, and Sony) provide you tools for. Learning C++ from the start, however, has absolutely nothing to do with your potential for "getting your foot in the door".

Any competent programmer, in the end, is going to wind up being familiar with multiple languages. At work, because we develop for the Nintendo Wii and DS (and other nondisclosable platforms), our programmers work with C++. ALL of our tools, however, are developed with C#. Why? Because it is simply faster to work with.

Share this post


Link to post
Share on other sites
DevFred    840
Quote:
Original post by WazzatMan
This basically relates to the whole C++ is obsolete issue...

C++ isn't obsolete, where did you get that idea? It just isn't suited as a first language for beginners. Once you know how to program, learning another language is easy. The hard part for a beginner is to learn two things at once: programming and a language.

Programming isn't about a certain language, plattform or API. It's a state of mind ;-)

Share this post


Link to post
Share on other sites
WazzatMan    102
Quote:
If you don't know how to program, the chances of you getting even a whiff of a programming position is 0%.

Y'know... that's pretty much the long and the short of it. If you don't know how to program, you've no chance. Using C++ as the medium to learn how to program sucks.


I know how to program.

And actually I think C++ would be a great medium to learn how to program. Why? because there are no safety harnesses. It's the same reason why I don't think Visual Studio is a good tool to teach programming with and why I agree with handwritten code for exams. It teaches discipline.

But really that's beside the issue.

The issue is, does any other language besides C++ have a future in professional game development?

[Edited by - WazzatMan on November 24, 2008 4:04:48 PM]

Share this post


Link to post
Share on other sites
zer0wolf    1022
Quote:
Original post by WazzatMan
i.e. I know how to program.

Okay? So do a lot of people.

Quote:
But really that's beside the issue.

Then why bring it up?

Quote:
The issue is, does any other language besides C++ have a future in professional game development?

Yes.

Share this post


Link to post
Share on other sites
zer0wolf    1022
Quote:
Original post by WazzatMan
Elaborate.

I did in my first post.

A LOT of money has been spent on developing the current tool chains for modern consoles. Using other languages is very viable, but it requires more legwork from the developers. C# and Python are used a lot in the production pipeline and scripting languages are integrated into a lot of game engines. Most developers want to spend their time and resources on making game and not rewriting compilers, so they still with C++ for the engine. There is a whole lot more to game programming than just engine programming.

Share this post


Link to post
Share on other sites
WazzatMan    102
Yeah, but you mentioned tools being created in C#. And Civilization IV has a lot of it's features written in Python. I know that, but the core is still written in C++.

P.S. I didn't mean to sound like a douche in my second post. -cleans it up-

Share this post


Link to post
Share on other sites
zer0wolf    1022
Quote:
Original post by WazzatMan
P.S. I didn't mean to sound like a douche in my second post. -cleans it up-

You did, but that's okay. It happens to everyone [wink]

Quote:
Yeah, but you mentioned tools being created in C#. And Civilization IV has a lot of it's features written in Python. I know that, but the core is still written in C++.


Think of this from a business perspective. C++ has been the de facto language for console since the release of the PS2 (not sure about the dev kits for the Dreamcast). The game industry is a multibillion dollars industry. Are you going to want to shake things up by rewriting your platform's compiler to work with a new language, or are you going to instead just try to provide more compiler optimizations and profiling to allow developers to squeeze the most amount of juice out of your system? Game engines are going to remain in C++ for some time because there isn't a point in reinventing an already well lubed wheel.

The vast majority of programmers, however are not engine programmers. Only about 1 in 4 of the programmers at my company really touch the actual game engine in any capacity. All of the rest of them are performing functions that can be performed with some sort of higher level language that allows them to be more productive... and so many of them do.

Share this post


Link to post
Share on other sites
Nick of ZA    177
Just my very small 2 cents here,

I think it's painfully misguided to even consider that a language like C++ is "becoming obsolete" (at least for game programming). In terms of squeezing out every last byte of memory and every CPU cycle, can you show me the contenders? Not Java, not C#, not any interpreted and/or dynamic language. Or perhaps you wish to take up developing exclusively in C or assembly language instead?

While I'm presently primarily an ActionScript programmer moving back into Java, I was weaned on C++ in college. And C++ still sits at the balancing point between ease of human use and processing/memory usage efficiency... not to mention it's OO nature (vs. C) allowing for better design.

If there were anything better for game dev, bud, people would be using it.

I am willing to use ActionScript and Java because I am willing to make the trade-offs involved with each -- ActionScript being orders of magnitude less efficient, Java having sucky (but automated!) memory management, among others.

It sounds to me as if you really don't want to go the whole way in mastering C++, and you want someone to tell you that that's okay. Well you know what, it's okay. But neither you nor I will likely be producing triple-A titles anytime soon with this approach. Unless of course you get remarkably innovative with those technologies you are willing to use (C#, Java).

Share this post


Link to post
Share on other sites
Grafalgar    548
As has been said already, C++ is actually a pretty rough language to start learning as a beginner mainly because of having to deal with pointers.

While I consider most post-C++ languages (Java, C#, etc) to be much more complex than C++, they are easier to learn as you never really have to worry much about dangling pointers, or matching news/deletes, and so on. Most newcomers to C/C++ abandon the language because pointers are very very intimidating and using them "right" takes a large amount of practice.

That said - if you're going "pro" do learn the ins-and-outs of C++ and make sure you can program sideways, dangling off the side of a cliff, with hungry crocodiles below you.

C++ is still favored heavily on consoles and PC mainly because of speed and really being able to "go to hardware" without jumping through any hoops. That's extremely important on consoles as you're stuck with one piece of hardware for several years, while demand for better/faster graphics and gameplay keeps climbing.

So that's why C++ is still thriving and happy in the industry. On gamedev.net's side: remember that a good chunk of people here are only hobbyists - and hobbyists don't need to know C++ if they can accomplish the same stuff in an easier/more protective language.

Share this post


Link to post
Share on other sites
Antheus    2409
Quote:
Original post by WazzatMan

I know how to program.


I have no intention to call you out on this and all I know about your programming experience comes from your yesterday's post.

Take the following with best intentions: don't worry too much about Evil Microsoft or job market. Become a good programmer, and you'll be wanted. And don't worry about which beginner language is good or not. Or how suitable the advice of others is.

But for now, don't be too quick to claim one language/API/company to be superior to other for whatever reason.

Also, once you're done with that book, there's 3 more waiting for you: Modern C++ Design, Exceptional C++ and More Exceptional C++. There's another one which was recently brought into my attention, namely Large Scale C++ Software Design.

Look them up in your library if you can, or if you're serious, at least buy the first 3. And then, look into boost. Those should cover the beginner part of C++.

Share this post


Link to post
Share on other sites
TheTroll    883
I think I can sum this up.

Many languages give you enough rope to hang yourself. C++ will often tie the knot and put the rope around your neck.

theTroll

Share this post


Link to post
Share on other sites
Telastyn    3777
Quote:
Original post by WazzatMan
I know how to program.


Good, so learn C++ if needed and go nuts.

Quote:

And actually I think C++ would be a great medium to learn how to program. Why? because there are no safety harnesses.


And I think that's a stupid reason. Further, it's not safety harnesses that C++ lacks, it's a sane compilation model; and a useful standard library, and... Time wasted tracking down or avoided C++'s pitfalls would be better spent learning.

Quote:

It's the same reason why I don't think Visual Studio is a good tool to teach programming with and why I agree with handwritten code for exams. It teaches discipline.


It teaches you to remember trivia. It promotes the use of undescriptive variable names. It hinders programmers' ability to get things done. It is a waste of time.


Quote:

I think it's painfully misguided to even consider that a language like C++ is "becoming obsolete" (at least for game programming). In terms of squeezing out every last byte of memory and every CPU cycle, can you show me the contenders? Not Java, not C#, not any interpreted and/or dynamic language. Or perhaps you wish to take up developing exclusively in C or assembly language instead?


Because clearly, every game has such performance requirements and every programmer in dev studios is skilled enough to actually get the performance out of C++... and as if that was even a distant second to the development time associated with the game...


But zer0wolf hits the key point, the key reason C++ is not obsolete yet has nothing to do with its merits.

Share this post


Link to post
Share on other sites
lmelior    325
I think there was some confusion here. It seems to me that the OP is beginning a new discussion based on the many previous discussions in which more experienced members steer beginners towards C# and Python as opposed to C++. I've seen many of these threads, and there is the occasional C#/Java/Python zealot that proclaims C++ is obsolete. The OP appeared to be responding to that; reading the first post, it doesn't seem to be his opinion.
Quote:
And actually I think C++ would be a great medium to learn how to program. Why? because there are no safety harnesses. It's the same reason why I don't think Visual Studio is a good tool to teach programming with and why I agree with handwritten code for exams. It teaches discipline.

But really that's beside the issue.
I thought that was the main issue, that beginners are steered away from C++ even though you don't agree with that decision. I'd have to say I agree with you. Has anybody gone from C# or Python to C++? As in, you knew as little as possible about C++ before you started? I would submit that moving the opposite direction will be much easier and much more rewarding, because the developer will appreciate the advantages that these "easier" languages afford them. Conversely, people trying to move the other way might resent C++ for not making it so easy on them, or simply give up entirely and try to convince other people not to try it either.

Share this post


Link to post
Share on other sites
Esys    156
Quote:
And actually I think C++ would be a great medium to learn how to program. Why? because there are no safety harnesses. It's the same reason why I don't think Visual Studio is a good tool to teach programming with and why I agree with handwritten code for exams. It teaches discipline.


I love this argument...however, if I were learning to drive, I don't think it'd be wise to learn in a Formula 1 race car. No safety harness, indeed.

Share this post


Link to post
Share on other sites
freeworld    341
Consoles don't support C#, they don't support C++... They support machine code and only machine code. Languages like C and java are just tools to make coding easier than typeing the series of 1's and 0's that make up an EXE.

Share this post


Link to post
Share on other sites
Drigovas    509
Quote:
Original post by freeworld
Consoles don't support C#, they don't support C++... They support machine code and only machine code. Languages like C and java are just tools to make coding easier than typeing the series of 1's and 0's that make up an EXE.
But the console's tool chain supports C++, and typically not even very well [console compilers and runtimes are notoriously primitive compared to PC compilers]. Building on top of that poor compiler a second compiler for another language is hard, and typically not worth the effort. That, coupled with enormous code bases of already established and battle-tested code, and you end up with a slow process of adaptation. You're going to need a really strong argument to convince a company to abandon a couple man-decades of work on hand-tuned super-optimized libraries, that also work around all the funky bits and wierdness of the individual platform-specific api's.

For the record though, languages like Java and C# do offer some pretty neat things to the compiler writers of the world that allow for certain types of optimizations that just are not realistic to perform in C++. There is plenty to be done in Java/C#/Python/etc that is interesting to game dev. I've beat this dead horse pretty bad, so I won't go into it deeply again, but the freedom of C++ also means that compilers have to tip-toe around certain sorts of special cases when making optimizations to not result in stupifyingly broken code. The result, the run-times add a bit of overhead to C# and Java, but compilers can play a lot more tricks with these languages than can be played in C++. That is, if you are a totally super-perfect C++ programmer, which is not likely the case. There are plenty of situations in which the managed memory of C#/Java can outrun by-hand memory management in C++, but I'll shut up now.

ps. Am I the only one who remembers the arguments about C++ being too slow for game dev, and that you should be using a mesh of C and assembly?

Share this post


Link to post
Share on other sites
Daerax    1207
Quote:
Original post by lmeliorI thought that was the main issue, that beginners are steered away from C++ even though you don't agree with that decision. I'd have to say I agree with you. Has anybody gone from C# or Python to C++? As in, you knew as little as possible about C++ before you started? I would submit that moving the opposite direction will be much easier and much more rewarding, because the developer will appreciate the advantages that these "easier" languages afford them. Conversely, people trying to move the other way might resent C++ for not making it so easy on them, or simply give up entirely and try to convince other people not to try it either.


To the contrary - often, complete novices tend to learn advanced Computer science concepts more readily than those steeped in C++. Proverbial Empty Cup takes more water than the filled one. As for the latter. I have never learned C++ but have no trouble *reading* it at its highest level. For me going to C++ would be like losing all my superpowers were I a superhero.

No longer could I in a step, use elegant theorems from Category Theory to derive algorithms and write programs to solve difficult constraint and mathematical optimization problems simply.

Quote:
Original post by Drigovas
ps. Am I the only one who remembers the arguments about C++ being too slow for game dev, and that you should be using a mesh of C and assembly?


Nah I remember those too. I came in at the tail end of them.

Share this post


Link to post
Share on other sites
Iced_Eagle    349
C++ is going to be here for a long while.

Hell, I still have the occassional bits of code that I will write in assembly, which obviously isn't mainstream.

C# is very helpful right now for tools development, where performance isn't as much of a concern, but rather getting stuff up and running, and ease of development (You want a button? Sure!)

You want to know what's best though? Understand programming concepts. Don't learn the language, but learn concepts. Then use the language as a tool to get the job done.

Even though I don't know C# much, really anything, I have absolutely no fear that I can get very good results and good quality C# code in like a week of studying the language. Obviously learning the nuances, efficiencies, and inner-workings that comes with experience helps write better code, but that's irrelevant. Since I know programming concepts, whatever fancy language my company wants me to learn, I'm all for it (brainf*ck, F#, whatever... Though there will be tears if I have to code in brainf*ck).

So is this really advice on your question? Maybe not.

Short version: Learn programming concepts, not languages.

Share this post


Link to post
Share on other sites
ToohrVyk    1596
Quote:
Original post by Telastyn
Quote:

It's the same reason why I don't think Visual Studio is a good tool to teach programming with and why I agree with handwritten code for exams. It teaches discipline.


It teaches you to remember trivia. It promotes the use of undescriptive variable names. It hinders programmers' ability to get things done. It is a waste of time.


I disagree fully. Handwritten code for exams is pure, unadulterated write-code-for-humans-to-read evaluation, and is probably the best kind of code a student could be asked to write for their evaluation. Learning to write code for a compiler is something you can learn on your own (the compiler will disagree with you until you get it right) but learning to write code for humans is something better learned from others.

As a side note, I've developed without a sensible IDE for quite a while, and it has also taught me a great deal of things.

Absence of auto-completion features forced me, through sheer laziness, to have a consistent design and naming strategy, so that I can guess the name of a class or method without having to look it up. It also forced me to reduce dependencies so that I only seldom have to depend on code outside what I'm writing (and therefore remember the names in that code), giving me natural tools to reduce coupling and wrap external APIs in tight modules to avoid leaking external naming strategies into my own code.

Absence of a debugger forced me, through sheer laziness, to mentally evaluate my programs before executing them to determine if bugs were present, and to fully memorize the contents of modules I was creating, allowing me to determine where a given bug was just by looking at it. When developing Darklaga, which happened fully without a debugger, only two bugs required me to trace through the code with log statements, out of several hundred bugs that were solved by my looking at the game screen, going "Hmmm..." and then opening the right file and changing the right line.

Absence of template generation tools, combined with an early distaste for copy-paste programming, taught me to factor repetitive code as soon as it appeared (in fact, before it even appeared, because I was too lazy to write it if it was already written).

Of IDEs, I still tend to only use the project management features and the build features. I still only need to open a debugger perhaps once every two days, and it's generally in dynamic languages that have no compiler and thus report most syntax errors through the debugger (javascript, I mean you). The only large debug-fests I perform are when I use C#, and mostly because of interacting with the .NET library (though I can only assume that my inexperience with the library combined with its lack of complete, concise and clear documentation is the root cause of this necessity). However, in all my C++, Objective Caml or PHP programming, which easily represents 90% of my coding time, I have perhaps used a debugger four times in the last six months, because I'm used to identifying the issue in my head.

So, if you program professionally, use an IDE. It does boost your immediate productivity by allowing you to solve any issues (find a method, find a class, find a bug, and so on) and also works quite well for interacting with code you didn't write (and thus couldn't have memorized). But as long as you're a learning programmer on your own, resist the temptation. Only use the debugger if you simply cannot find a bug after searching on your own—don't become so debugger-reliant that you can't spot an obvious bug by simply re-reading your code. If you can't find the name of something, then rename that thing so that it uses an easily remembered name, so that you gain a natural tendency to write names that are descriptive and unambiguous.

Share this post


Link to post
Share on other sites
JimmyDeemo    156
I find your above post very interesting ToohrVyk, and i'd like to know more.

I've been using VS2008 for a while and had to go back to VS6. I found it very frustrating not haveing all the bells and whistles i was used to.

How dumbed down did you get? What IDE DID you use? I think that doing the same thing as you did may improve my code a lot.

[Edited by - JimmyDeemo on November 25, 2008 4:32:58 AM]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this