Professional Games Made In C#?

Started by
95 comments, last by GameDev.net 18 years, 4 months ago
First off, I want to say that I love C# and I'm not a C++ zealot. I use C# all the time for a variety of tasks.

Secondly, nobody uses the forms designer in a game anyway so what does it matter?
Reasons to use C#:

The language is nice.

Reasons not to use C#:

It's slower than snails. Lots of benchmarks say it's not. Sure, you can get 90% of the speed of C++... in certain situations, but overall with a game engine you're going to see at least a 50% framerate hit what you could have acheived if you had written your game engine in C++.

Why is this? You'll need to look at what the JIT generates and see for yourself. But look closely at how poorly it inlines anything, if at all. Look at how well (or not) the FPU optimization is. Compare it to what the C++ compiler generates.

C# also basically requires you to use unmanaged C++ anyway to get 16-byte aligned data, if you want to effeciently use SSE instructions. Okay you say well you're going to write all of your vertex skinning in C#. Have fun with that, buddy.

The bottom line is, you're not going to get the next Unreal or Doom engine in C#. The hard-core stuff is going to stay in C++ for a while. As soon as I can get an engine that runs 95% as fast as it does in C++, I'll switch right over. But this means they're going to have to get their act together with the inlining, the memory alignment, and the FPU optimization.

Yes, I'm posting as AP, because as we all know posting a rant is bad for your rating. :D
Advertisement
thanks for your rant :D
I know im not going to get the next unreal... even if i did use C++ =p
So long as the frames per second on a Celeron D with 512 mb of ram is more than 33 fps, it should be fine.

With that said, do you know of any books that are for C++ that cover DirectX 9 and engine design and such? That would have examples that work in VC++ 2005? The main reason I was liking C# was all the new books out for it.
Quote:Original post by Michalson
It took years before game programmers moved from assembly to C, with lots of "C is too slow" whining. It took years still (~1995 and later), long after everyone else had moved, to get to the game industry to C++ (the age of "using objects would be too slow" is still fresh in my mind).


Its not just whining, its code reuse

If you have a working game engine and libraries for texture loading, input, and so forth is it worth rewriting it just for a few "new" features

So if they already have tonnes of reusable code and all the libraries they need why should they dump years of work and start from scratch just for garbage collection and a few syntactic short cuts.
Ahh but im making my own engine and starting my own code base so that doesnt really effect me :-P
I don't see any reason for a forms editor to be useful in game dev unless it is a desktop game or something like that, well games like that could even have been done with delphi or visual basic anyways.

It would be useful for tools maybe but not for the game development itself.

And what language to choose I am staying with C++, I don't really find C# much easier. but it depends on the programmer, seriously.
------ XYE - A new edition of the classic Kye
The Zbuffer has a list of popular games written in C# here. Many of them are successful commercial games like Arena Wars. It basically comes down to your project. If you aren't making the next Unreal or Doom, you should strongly consider C# and Managed DirectX for its great productivity.
You can use OpenGL in C# through the Tao Framework.
Rob Loach [Website] [Projects] [Contact]
Quote:Original post by Anonymous Poster

It's slower than snails. Lots of benchmarks say it's not. Sure, you can get 90% of the speed of C++... in certain situations, but overall with a game engine you're going to see at least a 50% framerate hit what you could have acheived if you had written your game engine in C++.


That is such BS. Why don't you post this code? MDX is at least 95% the speed of DX (I beleive the number was higher), so don't post random numbers.
Quote:Original post by Vexorian
I don't see any reason for a forms editor to be useful in game dev


yeah if my understanding of forms is correct then WRT an actual game theyre about as useful as a condomvending machine in a nunnery
Quote:Original post by Fixxer
Ahh but im making my own engine and starting my own code base so that doesnt really effect me :-P

(Kaze)
not sure about the speed and C# dosent have as much support as C++ yet so you prorbaby wont be making "teh most uber 133t fps ever" but if your a independent developer and want to make a game engine in C# go ahead.

This topic is closed to new replies.

Advertisement