What's Wrong with C#

Started by
106 comments, last by Mayrel 19 years, 11 months ago
Hi Respected Programmers ! I have read all the flame wars on gamedev.net about C# vs C++ but in none of the posts it was mention why you can''t develop Quake 3 in C# . Or can we !! This posts is not to start a flame war again but i need to get educated about the real problem with C# ( if it has )while using it to develop FPS Games. Thank you. All the answers are highly appreciated. Note:Sorry for grammatical mistakes english is my second language Attitude is one thing which makes a big difference.
Attitude is one thing which makes a big difference.
Advertisement
Don''t believe everything you hear dude. This C# vs. C++ war going on is kinda like the Linux vs. Windows war, it really depends on your viewpoint. The major arguments against C# is that is CAN be slower than C++ and that is a completely Microsoft made language.

The first argument, about the speed issue, was used when C++ was first introduced also...when games were made in assembly language. The deal with this is that C# is slower than C++ because it is more abstracted but computers are becomming so fast that it doesnt matter, or at least it won''t matter soon in the future.

The advantage of using C# us that it is easier to write and maintain a C# based program when compared to C++. And with the complexity of current game development project...simplicity in your language can only help.

Hope that help clear some things up. Ive written simple games in both languages. The C# program was about 4% slower than my C++ programs. You can judge for yourself if that is a major problem. If you are truly interested...check out documents about Managed DirectX, which is kinda DirectX for C# (it works with VB and C++ too).

Happy coding!
The biggest problem from a professional game maker''s standpoint is that you can''t use it on PS2/GC/XBox. If you''re only making PC games then I''ll leave it to everyone else to sort out...

-John
- John
Thank you for your comments . I will look in to it.
Thanks again
Attitude is one thing which makes a big difference.
quote:Original post by boebi
but computers are becomming so fast that it doesnt matter, or at least it won''t matter soon in the future.

- I don''t think this is generally true. Any heavy-weight engine benefits from all the extra-time it saves, as there''s always room for more (Graphics, AI, Audio, whatever-I-don''t-know-about). I don''t think Doom3 or Unreal3 can suffer a 10% performance loss.

- For indie games though, that''d be true for the most part (no heavy-weight stuff most of the time)

- Many people don''t have the money to keep updating their PCs.

Muhammad Haggag,
Optimize
Bitwise account: MHaggag -

Obviously platform dependence is an issue. Even for Widows games, we don''t *especially* want people to have to install the .NET framework (although it''s not a big problem). Other platforms either don''t have .NET, or don''t have usable .NET

I use advanced features of C++ which C# doesn''t have. That doesn''t mean you can''t do those things in C#, just you have to do them a different way.

I''m sure the performance of C# is not a major issue. In any case, even if you did feel that it wasn''t fast enough, you could always rewrite the *really* time-critical routines in unmanaged C++ and just call them from C#. That would probably only be a small proportion of the code. Calling between C++ and C# isn''t *that* hard (although slightly harder than from C# to C# or C++ to C++ obviously)

Mark
probably the best way is to develop games using c++ and to create utilities (level editors, package editor etc.) using c#.



What we do in life, echoes in eternity!
What we do in life, echoes in eternity!
Thank you again for sharing the knowledge with me guys.


I was wondering if there is any recent game came out in C# in the market or is there will be any comming soon.
One more issue is that if Microsft will be doing anything about it i mean they released Managed Direct X and If i am not wrong the DX samples has a complete game demo written in C++ but no C# . Do you guys think they are going to do something about it i mean are they making any games or giving contract to other game companies to create games in C#, How about XBox will we see any C# made games for XBox.

anyways thanks for reading and giving your time to read my posts and commenting on it .




Attitude is one thing which makes a big difference.
Attitude is one thing which makes a big difference.
Here's a thought:

C# is much faster to learn and use than c++, and for beginners the 3% (or so) speed difference doesn't matter (and that's with c# and optimized c++). Managed DirectX is much "nicer" that unmanaged DirectX (COM?) so it adds to the ease of learning. Tao and other OpenGL libs for c# means that you can learn to use OGL as well.
Then after you have made your first game in c# you can look into porting it to c++.
All the stuff that goes into a game is the same in both c# and c++ (Game loop, AI, scene graph, input handling, rendering etc). The difference is how each function is coded. So by learning how to make a game in c# you also learn how to make a game in c++.. You only need to learn how the individual functions should be written in c++. Oh, and how to use garbage collection, (smart) pointers and managers and probably a lot more you don't need to think about in c#.

Note: One reason to learn in c++ is that there are a lot more tutorials and books for c++ than c#, but it's not that hard to look at c++ code and understand how it can be done in c#.

Nomz, I'm pretty sure that the next version of the DX SDK will have a lot more samples for c#.

[edited by - frostburn on April 16, 2004 10:15:47 AM]
Why so many people think that no great games can be written with Java and C#? Because the Internet is full of wannabe c++ elitists with attitude problems pronoucing their opinions based on no first hand experience. They judge the languages with opinions similar to these:

-Java 1.1 was slow, so Java must still be slow
-Java applets suck, so Java must suck
-C# sucks because I hate Microsoft
-No way C# or Java can be used for quality games because no AAA game has been made with it yet

This topic is closed to new replies.

Advertisement