Sign in to follow this  
wowchickftw

C# for game programming?

Recommended Posts

wowchickftw    122
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.

Share this post


Link to post
Share on other sites
Ezbez    1164
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++.

Share this post


Link to post
Share on other sites
gharen2    520
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.

Share this post


Link to post
Share on other sites
wowchickftw    122
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#?

Share this post


Link to post
Share on other sites
Daerax    1207
Telastyn    3777
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.

Share this post


Link to post
Share on other sites
gharen2    520
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.

Share this post


Link to post
Share on other sites

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