C# for game programming?

Started by
8 comments, last by gharen2 16 years, 4 months ago
Hey Everyone :) Got a question for you guys since I'm very new to all of this (game programming that is).. I've had some experience working with C# using VS .NET over the past year and a bit but wanted to take that further and try my skill at game programming. However, I was told that there are other OOP languages that are better to use for gaming than C#. I am also very familiar with C++ as they are extremely closely related. Could anyone clarify for me WHY it is that C# is probably not the best one to be using? Unless of course... whoever told me that bit of information was misinformed and didn't know what he was talking about. I've spent some time browsing around different websites, books and articles for a comparison between the two, but have yet to find anything concrete. Mind you, most of what I've been running into is game programming with C++ and not very much at all with C#. Sorry for the wall of text :) Hope some of you can offer me some insight.
Advertisement
C# would work quiet well for what you are doing.

The person that told you C# would not work well for games was very misinformed.

theTroll
Is there a 'better' one to be using over the other? Or at this point because both languages are so closely related, does it not matter?

Thanks for the response theTroll
C# is not just a perfectly viable way of creating games, it is, in my opinion and experience, one of the *best* ways to make a game. Perhaps the only real concern could be a slight lack of mature libraries for .NET. There's plenty of half-baked libraries out there, but not as many highly developed ones as there are for, say, C or C++.
Whoever told you that is misinformed. C# is perfectly adequate for game programming, in fact I'd call it ideal for amateurs. You can do pretty much anything you can do in c++, yet it's much, much, less headache. (By the way, c# and c++ only have similar syntax, and the similarities end there. The fact that you've been using c# for a year doesn't mean you're familiar with c++. It's an entirely different beast).

The main argument people use against using c# for games is that the garbage collector slows things down (which is debatable). But, any complex c++ game has to use a memory manager to avoid memory fragmentation anyways, which also adds overhead.

Basically, unless you're looking to create Halflife 3 or Halo 4, the language should be the least of your concerns. Use whatever you're comfortable with.

Quote:Original post by wowchickftw
Is there a 'better' one to be using over the other? Or at this point because both languages are so closely related, does it not matter?

Thanks for the response theTroll


They aren't at all closely related. The only reason I'd use c++ would be to use legacy c++ code that already exists, or for console programming, which for the most part is c++ only. And those are both issues the professional game industry has to deal with, not the average amateur programmer like 99% of the people here.
Quote:Original post by Ezbez
Perhaps the only real concern could be a slight lack of mature libraries for .NET.


So, correct me if I'm wrong, but could this limit game development with C#?
There is nothing to clarify because you were given bad information. C# is a preferable option to C++ when you wish to get something out with less hassle and arcane wizardry.

=======Driv3mefar \ promit list? ===============

The big list:

1) Professional Games Made In C#?
2) Java for game development?
3) Java----C/C++
4) c++ or c#
5) Question about Java Vs. C# Vs. C++
6) Java Games?
7) Java is fast?
8) Secondary Language:VB or Java?
9) What makes C++ so powerful?
10) C# games and cheating...
11) Is C# good enough for system utility programming
12) MC++ vs. C#
13) Which language is best for a 3d Games Engine?
14) C# vs C++ as a choice for development
15) Is Java the Future?
16) why C# and not Java?
17) What do you think of the D language?
18) my c++ d c# benchmark!
19) The Definitive Guide to Language Selection
20) Sharp Java
21) C++ or C#?
22) C++ or C#?
23) Java disadvantages
24) C++ or C#?
25) Visual C++.net vs Visual C#.net
26) C# - huh?
Quote:Original post by Ezbez
C# is not just a perfectly viable way of creating games, it is, in my opinion and experience, one of the *best* ways to make a game. Perhaps the only real concern could be a slight lack of mature libraries for .NET. There's plenty of half-baked libraries out there, but not as many highly developed ones as there are for, say, C or C++.


Quoted for agreement.
Thanks so much everyone! You've all been a wonderful help :)
Quote:Original post by wowchickftw
Quote:Original post by Ezbez
Perhaps the only real concern could be a slight lack of mature libraries for .NET.


So, correct me if I'm wrong, but could this limit game development with C#?


I don't consider this to true. Pretty much any library usable from c/c++ is usable from c#, whether via interoping or c++/clr.

I've only encountered one situation where this is not possible: using the xna framework on the xbox 360. You can't use native libraries on it, so using say, a well established third party physics engine like ODE on it is impossible. And there isn't a .net alternative yet. But if you're sticking to windows, linux, or osx, there's no such limit.

This topic is closed to new replies.

Advertisement