Sign in to follow this  

Best Programming Language?

This topic is 4586 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is C++ still the language of choice for game developers? What about the new managed stuff for windows like C# or managed C++? I understand there is a managed version of DirectX now too. Will software houses be moving over to this, or is c++ too embedded now? Also, as far as cross-platform engines go for console gaming etc. should OpenGL be the API of choice or DirectX, or do most cross platform engines have an abstraction layer for each that maintains a consistent API by being able to plug in either an OpenGL or DirectX version of that layer? Thanks all

Share this post


Link to post
Share on other sites
Can you say "flame bait"? This type of question almost never has good results; Most people will simply defend thier language and API of choice to the death.

Yes, C++ is still an industry standard. You can also use any other programming languages that meet your requirements. Professional studios will do exactly that - use whatever best meets thier needs. Often this still means C++ simply because they have a lot of experience and/or existing code bases, but noone will stick to a language simply because it's what they've used before, and there are high quality games in C, C#, Java and even some BASIC variants. Hell, if I'm not mistaken Myst was 'written' using an authoring tool, HyperCard.

DirectX isn't cross platform (excepting the fact that it's used on both Windows and XBox). OpenGL is a good choice for a cross platform rendering API, but yes, plenty of engines use abstraction and provide a choice of renderer. Both are excellent APIs.

Once you've learnt one language, it'll generally be a lot simpler to learn any other language, so just pick something and start with it if that's where your question is leading.

There is no best language - but don't work in QBasic. [wink]

Share this post


Link to post
Share on other sites
Oh no, not again.

My advice is to not ask these types of questions in public forums. Do non-bias research on each language and try to weigh the differences depending on your goals.

In here, there is no best. Just favorites.

Share this post


Link to post
Share on other sites
To my knowledge, C++ is still by and large the language of choice. C# seems as though it has some followers here, and will make at least some headway. At least around here, it seems like there's a bigger push to use multiple languages. C++ for the lower level rendering code and a much higher level language like python for the actual game. It's not a massive thing, but that seems to be something [at least to me] that is new and gaining a little steam.

I'm not sure about consoles, but for different PC platforms, OpenGL is still the API of choice, though as you note it's not uncommon to abstract out the rendering API.

Share this post


Link to post
Share on other sites
If you want to be really good at programming, learn C++, Lisp, Prolog, Smalltalk, and any other language you can spare the time on.

If you want to learn the language used by 'the industry' right now, learn C++.

If you want to do business apps, learn C#, Java, VB.Net, or other similar languages.

Personally, I think the best language is Common Lisp, but because it has a small community it is rather lacking in library support. Of the libraries there are, many are de facto standards but you'll have to look very hard to find them.
Because of my inexperience with Lisp, the difficulties associated with learning it, and the fact that I can't use it at work, I currently use C++ for my hobby projects.

Share this post


Link to post
Share on other sites
Quote:
Is C++ still the language of choice for game developers?


For the time being, yes it is right now. However, there are a lot of other options that are better, per se, for game tool development.

Quote:
What about the new managed stuff for windows like C# or managed C++? I understand there is a managed version of DirectX now too. Will software houses be moving over to this, or is c++ too embedded now?


Managed stuff is still new and constanly evolving. It will take some time before it is a steady and stable language. I highly doubt software houses moving over to Managed anything for the time being, especially DX. It's just too new at the time.

Quote:
Also, as far as cross-platform engines go for console gaming etc. should OpenGL be the API of choice or DirectX, or do most cross platform engines have an abstraction layer for each that maintains a consistent API by being able to plug in either an OpenGL or DirectX version of that layer?


The best engines will have an abstract API layer to allow either or [wink]. For example, in Ogre3D, it has 3 main plugins for rendering, DX7,DX9, then OpenGL. You can choose which one you want to use at runtime. Very powerful indeed! Not to mention you can make your own custom ones and simply drop them in.

Share this post


Link to post
Share on other sites
c++ is still the standard programming language. And in my opinion will remain some time :D. Whenn there are more books, utilities etc... and btw bjarne stroustru works at a improvement of c++ language called C++0x (check http://www.research.att.com/~bs/ )
PS: i don't say that C++ is the best language, just say it is most used :D. i used C++ but i only know C++, pascal and a little BASIC, C# and Java ) anyway i like c++ very much

Share this post


Link to post
Share on other sites
Quote:
Original post by Raeldor
Is C++ still the language of choice for game developers? What about the new managed stuff for windows like C# or managed C++? I understand there is a managed version of DirectX now too. Will software houses be moving over to this, or is c++ too embedded now?

Also, as far as cross-platform engines go for console gaming etc. should OpenGL be the API of choice or DirectX, or do most cross platform engines have an abstraction layer for each that maintains a consistent API by being able to plug in either an OpenGL or DirectX version of that layer?

Thanks all


You can have a look at this comparison at TIOBE.

Since 28% is using C/C++ which is more than any other language by a very large margin it is safe to say that C/C++ is definately the way to go if you care about which is more popular. But as two Swedish comedians said (Tage Danielsson & Hasse Alfredsson) "There are three kinds of lies: Lies, damned lies and statistics!" :)

So interpret it anyway you like. I really don't care which is more popular. I like C/C++/Assembler and I don't care if anybody thinks we should use C# "because it is (insert superlatives)" *sighs*

Use the language *you* feel most comfortable with. Once you know a language well, learning another is fairly easy.

Share this post


Link to post
Share on other sites
Quote:
Original post by happybara
HQ9+

I've written a parser:

/*a HQ9+ parser. Use it to make good game*/

#include <stdio.h>

const char helloworld[] = "Hello, world!";
const unsigned int bottles = 99;
unsigned long theaccumulator = 0;

void feature_H(FILE* file)
{
printf("%s\n", helloworld);
}

void feature_Q(FILE* file)
{
char ch;
long int back = ftell(file);
fseek(file, 0, SEEK_SET);

while((ch = fgetc(file)) != EOF)
fputc(ch, stdout);

fputc('\n', stdout);
fseek(file, back, SEEK_SET);
}

void feature_9(FILE* file)
{
unsigned int cont = bottles;

while(cont > 0)
{
printf("%d bottle%sof beer on the wall,\n"
" %d bottle%sof beer.\n"
" Take one down, pass it around,\n",
cont, cont > 1 ? "s ":" ", cont, cont > 1 ? "s ":" ");
--cont;
if(cont == 0) printf(" no more bottles of beer on the wall.\n\n");
else printf(" %d bottle%sof beer on the wall.\n\n", cont, cont > 1 ? "s ":" ");
}
}

void feature_PLUS(FILE* file)
{
++theaccumulator;
}

int main(int argc,char *argv[])
{
FILE* filein;
char ch;

if(argc == 1)
{
fprintf(stderr,"Usage: %s filename.hq9+\n",argv[0]);
return 1;
}

filein = fopen(argv[1], "r");

if(!filein)
{
fprintf(stderr,"Cannot open input file\n");
return 1;
}

fseek(filein, 0, SEEK_SET);

while((ch = fgetc(filein)) != EOF)
{
switch(tolower(ch))
{
case 'h':
feature_H(filein);
break;

case 'q':
feature_Q(filein);
break;

case '9':
feature_9(filein);
break;

case '+':
feature_PLUS(filein);
break;

default:
fprintf(stderr, "Parser error: invalid (%c) instruction", ch);
fclose(filein);
return 1;
}
}

fclose(filein);
return 0;
}




[grin] [grin] [grin]

Share this post


Link to post
Share on other sites
TCL! http://wiki.tcl.tk

Okay, but seriously, learn whatever languages you want but learn them well. It's more important to understand the programming concepts because you could end up using anything at work.

I'm employed in a consultancy role and our company uses TCL for client side configuration (VB was not an option at the time), Java and C++ for the product and wrapper code. We also have our own custom scripting languages for modifying the products.

It took me about two weeks to get to grasps with TCL, yes it's very basic but that's not the point, because I have a good idea of how to program. I'm now moving in to a new role and got asked whether I was better at C++ or Java and seeing as I said C++ they're making me do Java work :0) I don't mind at all though as it's another feather under my cap/string to my bow.

C++ is a good language to learn because it covers nearly all the key concepts that you'll find in other languages with the big one being Object Orientated Programming. You should however always use the tool appropriate to the job, do you really want to write cgi scripts in c when you can use something a lot simpler and designed for the task?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I'm sorry, but the best programming language is HTML with CSS, you can even make a n awesome hockey game with it, one like the ones EA makes.

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
I'm sorry, but the best programming language is HTML with CSS, you can even make a n awesome hockey game with it, one like the ones EA makes.

You can toss out atari+ quality games in hours instead of years, and all you need to play is a capable web browser! No download or compiling required [wink]

I wish I still had that old space invaders clone I made. Had full collision detection and about 50 enemy ships moving independently :)

Share this post


Link to post
Share on other sites
Quote:
Original post by Raeldor
Is C++ still the language of choice for game developers? What about the new managed stuff for windows like C# or managed C++? I understand there is a managed version of DirectX now too. Will software houses be moving over to this, or is c++ too embedded now?
AFAIK C/C++ are the only languages with (decent) compilers for the Sony PS2, MS XBOX & Nintendo GameCube. You'd kind of expect MS to support .net in the next XBox but game developers making a game for PS3 & XBox2 want to write it once, not have a C++ PS3 version and .net XBox2 version.

Since the games industry == console games to a large degree, C++ rules until consoles support something better/different. And that's unlikely to just be another language, only a more useful language. Java/C# are the obvious choices but getting a compiler on all consoles is a major undertaking.

Share this post


Link to post
Share on other sites
Quote:
Original post by Raeldor
Is C++ still the language of choice for game developers? What about the new managed stuff for windows like C# or managed C++? I understand there is a managed version of DirectX now too. Will software houses be moving over to this, or is c++ too embedded now?

As others have pointed out C++ is still the language of choice for game development since C and C++ are the only languages widely supported on the major console platforms. That's not likely to change any time soon - managed languages aren't ideally suited to platforms with strictly limited memory due to their somewhat unpredictable memory usage.
Quote:

Also, as far as cross-platform engines go for console gaming etc. should OpenGL be the API of choice or DirectX, or do most cross platform engines have an abstraction layer for each that maintains a consistent API by being able to plug in either an OpenGL or DirectX version of that layer?

OpenGL is no better than DirectX for cross-platform engines for consoles - there's no OpenGL support on the GameCube or PS2 whereas versions of DirectX are supported on the Xbox and the PC. The PS3 will use a variant of OpenGL ES and the Xbox 360 will use a variant of DX9 so cross-platform engines will likely continue to use an abstraction layer that supports a platform specific rendering back end (which may be neither OpenGL or DirectX). Console games usually take advantage of special knowledge of the underlying graphics hardware that you don't have on the PC.

Share this post


Link to post
Share on other sites
[quote]Original post by mattnewport
Quote:
Original post by Raeldor
Is C++ still the language of choice for game developers? What about the new managed stuff for windows like C# or managed C++? I understand there is a managed version of DirectX now too. Will software houses be moving over to this, or is c++ too embedded now?

As others have pointed out C++ is still the language of choice for game development since C and C++ are the only languages widely supported on the major console platforms. That's not likely to change any time soon - managed languages aren't ideally suited to platforms with strictly limited memory due to their somewhat unpredictable memory usage.

not to mention they still working out what the best game loop is using C#...
http://blogs.msdn.com/tmiller/archive/2005/05/05/415008.aspx
whereas in C/C++ everyone has been using the same one like forever!

Share this post


Link to post
Share on other sites

This topic is 4586 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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