Archived

This topic is now archived and is closed to further replies.

C++, C# with a little Cg Question.

This topic is 5504 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

I have a very simple question for the experienced. Which language do you suggest to a person who wants to write games...C++ or C#? Also, with the advent of other languages comming into play, what do you make out of NVidia''s Cg language. Any info would be helpful. Thanks.

Share this post


Link to post
Share on other sites
quote:
Original post by Raduprv
C/C++ is faster (and much easier :D ) than C#

And ignorance strikes again...



God puts an apple tree in the middle of the Garden of Eden and says, do what you like guys, oh, but don''t eat the apple. Surprise surprise, they eat it and he leaps out from behind a bush shouting "Gotcha." It wouldn''t have made any difference if they hadn''t eaten it... because if you''re dealing with somebody who has the sort of mentality which likes leaving hats on the pavement with bricks under them you know perfectly well they won''t give up. They''ll get you in the end. -- Douglas Adams

Share this post


Link to post
Share on other sites
I was under the impression that Cg was merely intended for shader programming; a complement to the main programming language rather than a candidate for that role.

As for the language choice, it''s probably mostly a question of personal preference. C and C++ have several advantages over C# due to their age and popularity: There are more resources (books, tutorials, etc.) covering them, more compilers (many of them free), and they are currently more portable (though work is being done on C#, as I understand). As for the technical merits of the respective languages, I lack the knowledge of C# required to make such a comparison.

Share this post


Link to post
Share on other sites
Here is what it boils down to... if you want your app to work on "normal" computers (eg. without the .NET runtime installed) use C/C++. If you need speed use C/C++. Ease of development use C#. Cross platform use C/C++. The only real advantage of C# is that it is easyer to use, as for the speed it may get better with the release of DX9. As for being free the C# compiler is free with the .NET framework sdk and there is a very good ide built with C# that mimics Visual Studio.

Now what level programmer are you? I would suspect a beginner if so I would try to learn C# for 3 reasons. 1 it is pretty easy to learn and has a bit more of a relaxed syntax. 2 if you want to move to C/C++ later it is alot easer than moving from VB to C/C++ seeing as it has pretty much the same syntax as C/C++. 3 you probably won't be doing a 3D FPS right off the bat and the littler games will be easer with C# so you will see results from your work easer and faster.

So really it is up to you I would read up on C# and maybe look at a bit of source code and then look at some source code from C/C++ that does the same thing and see which one is more your style. Really it is all just a matter of preferance I have learned both C/C++ and C# I like C# because of it's ease and quickness to get things done and I like C/C++ to make libaries in so I can still do things fast. oh yea I forgot to mention C# can use C++ libraries.

Whoops forgot about the shader language. All it is used for is shading and stuff like that. As far as I know you can not make a game out it...yet LOL but it is alot like C and only works on very few cards at the moment but this will chage very soon...

[edited by - djkno3 on November 19, 2002 7:56:08 PM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I appreciate all of the responses folks. I will learn what comes the easiest...C#. I know that it is a new language, but if anything like C++ (but simpler) I''ll go that rout and slowly touch on C++. As far as my programming level, I''d have to say that I am a Novice^2. I have not idea what I am looking at when I see code, but I am really willing to learn because it facinates me. Thanks again guys.

Share this post


Link to post
Share on other sites
I appreciate all of the responses folks. I will learn what comes the easiest...C#. I know that it is a new language, but if anything like C++ (but simpler) I''ll go that rout and slowly touch on C++. As far as my programming level, I''d have to say that I am a Novice^2. I have not idea what I am looking at when I see code, but I am really willing to learn because it facinates me. Thanks again guys.

Share this post


Link to post
Share on other sites