Good Language choice for a wannabe pro game developer

Started by
50 comments, last by SimonForsman 15 years, 4 months ago
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?
Advertisement
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.
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.
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 (&#106avascript, 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.
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]
Quote:Original post by JimmyDeemo
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.


I started with an early HyperCard version. No auto-complete, no decent manual (I had to learn language commands by reading other programs), not even syntax highlighting or code formatting and certainly no serious debugger.

Then I moved on to Borland C++ Builder 4, then to Visual C++ 6, both of which were unreasonably pre-standard, although they did provide an elementary debugger that sometimes actually managed to run. Darklaga development happened in Visual C++ Embedded Edition 4, which had a lousy emulator for debugging that simply didn't match my hardware, so I had a lightweight VS6-like IDE with no debugging facilities (though my "build, upload to embedded device, run" process worked fine).

These days, I use Visual C# for .NET development, and emacs for PHP/OCaml/C++ development. I also write &#106avascript, XSLT and CSS in emacs, but use FireBug for testing and debugging.
Quote:Original post by JimmyDeemo
I've been using VS2008 for a while and had to go back to VS6.

May I ask why?
Quote:Original post by DevFred
Quote:Original post by JimmyDeemo
I've been using VS2008 for a while and had to go back to VS6.

May I ask why?


At work we develop certain projects for NT platforms, as they are part of our legacy machines we need to keep writing code for. I was under the impression that later versions of VS stopped supporting NT, or thats what i was told.

Quote:Original post by Daerax
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.
You could install a translation module [smile]

Quote:Original post by ToohrVyk
I've developed without a sensible IDE for quite a while

I would prefer to develop without hands, managing the keyboard with nose and tongue!
Beside, thanks for sharing.

This topic is closed to new replies.

Advertisement