C# or C++?

Started by
9 comments, last by ravyne2001 17 years, 5 months ago
Hey, Im just learning the directX api's @ tha mo and there seems to be two distinctive ways on using them. Either in c# or c++. I think i read somewhere that directX was not properly supported in C# until directX9?? Why is this? Is it because C# is a new language? or because c++ is way better. So I have the directX 9 SDK, does C# support EVERYTHING that c++ does now? Anyway, I would like to know this because using directX in C# seems alot simpler than using c++. But if there are going to be any long term disadvantages using C# I would like to know. The only obvious advantages i can think of using C++ is you have a more control over low level operations, but im just starting out simple so this is not going to be a major issue. Thanx
Advertisement
The only advantage of C++ over C# that's worth talking about is that you'll be able to find more game jobs right now if you know C++. If you only know C#, you won't stand much of a chance.

If you don't really care about a job right now and want to program as a hobby, definitely go with C# - it's way easier to actually get stuff done in your free time.
Excellent! thanx thats what I wanted to hear haha.

So what language are games like doom3 and quake4 written in? because they all use the directX api's.
Pretty much all the mainstream games are written in c++ .

Squiggly Frog - My little project place on the web. Updated as I see fit. =)

If you're asking about what language to learn first, learn C#. I'm assuming you are a beginner, so if I'm wrong, feel free to correct me.

C++ is a much more complicated language as far as I'm concerned. There's a lot of ambiguity to a beginner who isn't familiar with general programming concepts. It will be much easier for you to take a year or two to learn how to program with C# then pick up C++ in a few months, than it would be the other way around.

Remember, your first language is the hardest because you learn the language and programming theory at the same time. So, I would recommend things like C# or (especially popular with forumers around here) Python, and after you have a firm grasp with your primary language, branch out into C++.
XBox 360 gamertag: templewulf feel free to add me!
Quote:Original post by templewulf
If you're asking about what language to learn first, learn C#. I'm assuming you are a beginner, so if I'm wrong, feel free to correct me.



No no, I have had quite a bit of experience with many languages, java &#106avascript, C, c++, prolog, nqc etc.<br><br>Specifically for GAMING, I was wondering which language would benefit me more, C# or C++. I don't actually know C# yet but it looks very similar to java with a few C++ syntax changes, so it shouldn't be a problem to pick up.<br><br>Like, am I going to be disadvantaged in any way by programming in C# because I heard it was not as widely supported with directX.
Quote:Original post by DjMaSh
Excellent! thanx thats what I wanted to hear haha.

So what language are games like doom3 and quake4 written in? because they all use the directX api's.


Just to point out, the two games in particular that you mentioned were written primarily using OpenGL, not DirectX (though they may have Direct3D renderers on certain platforms.) Half-Life 2 is an excellent example of a popular DirectX game.

That said, the difference between Direct3D and OpenGL are mostly trivial if you understand the process behind them.


As to C# vs. C++, choose what is easiest to learn if you don't have a lot of previous experience with one already. For a total beginner, I'd recomend C#, simply because the language is simpler and the libraries are consistant and layed out well. The language also protects you from some things that can bite beginners(like memory leaks.) Either language will cover the basics for you, 90% of your aquired knowlege will transfer to the other language; more than half of it directly

Also, "Managed DirectX" is being discontinued in favor of the XNA framework, Managed DirectX 1.x is in maintainance mode only, and 2.0 will never see the light of day (Much of 2.0 became XNA.)

throw table_exception("(? ???)? ? ???");

Quote:Original post by Ravyne
As to C# vs. C++, choose what is easiest to learn if you don't have a lot of previous experience with one already. For a total beginner, I'd recomend C#, simply because the language is simpler and the libraries are consistant and layed out well. The language also protects you from some things that can bite beginners(like memory leaks.) Either language will cover the basics for you, 90% of your aquired knowlege will transfer to the other language; more than half of it directly


Not to split hairs but I hate the choice of words "simpler". It makes C# sound like a less proficient language or "dumbed down". I agree with you completely, but in place of simpiler I would have said "cleaner" or "less burdened by legacy crap".
Hm sounds familiar

clicky

My project`s facebook page is “DreamLand Page”

I started programming with C++ and DirectX. Later I somehow moved to C# without noticing and found it much easier and flexible. One thing im concerned about is that first, if i try to use C++ now, i really can't... and i need to because i got into game development for developing for consoles. The only console i've heard of that uses a managed language (C#) is XBox. Ive recently started developing for GBA (homebrew) and it uses c/c++ and after using C# im finding it VERY hard to make a single gba demo. Im not sure what to do now? Should i go back to C++ and forget about C#? Please some help

This topic is closed to new replies.

Advertisement