• Advertisement

Archived

This topic is now archived and is closed to further replies.

What's Wrong with C#

This topic is 5013 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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!

Share this post


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

Share this post


Link to post
Share on other sites
Thank you for your comments . I will look in to it.
Thanks again

Share this post


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

Share this post


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

Share this post


Link to post
Share on other sites
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!

Share this post


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

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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

Share this post


Link to post
Share on other sites
Let me just add something here that seems to be forgotten often: even if your language implementation is fast, that doesn''t mean your game is going to be fun.

My favorite game at the moment is Megaman 2 from the NES platform. To code such a simple side-scroller today, you could use C or C++ or C# or Java or Python or whatever, and we probably wouldn''t notice any speed difference. Performance starts to be noticeable when doing 3D, lots of sound, intensive AI, etc. But does that really make a game fun? I think you''d be better off trying to figure how to make your game more fun than how to make it faster. Just a thought.

A PC version of the game "Gunstar Heroes" from the Sega Genesis platform would be killer by the way

Share this post


Link to post
Share on other sites
quote:
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


Well why don''t you show us the last time java goes faster than BASIC... you probably are
quote:
Because the Internet is full of wannabe c++ elitists with attitude problems pronoucing their opinions based on no first hand experience.
well I don''t say java sux its just that java was made for the internet... why doesn''t it stick with it? last time I ran a java compiler... too made out of java(Netbeans) it took about 3 min. to load the resources and I have 1 gig of ram and 2.4 ghz

Why don''t YOU support your "opinions" because your a dam hypocrite. >:O

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
C# is great if you only want to write games for Windows.

Even if you just write for Windows, there is another concern: Microsoft flies through technologies faster than developers can master them. COM, DCOM, COM+, ASP, etc.. How long will C# be around? Because it''s not an industry standard, available on all platforms, and defined independently of any one company, you have very little stability.

Share this post


Link to post
Share on other sites
I like to write a program knowing most people can instantly load it and play it. I think that''s the biggest drawback of C# at the moment, but maybe 5 or so years from now it will be safer to assume that .net will be on most PCs.

Value of good ideas: 10 cents per dozen.
Implementation of the good ideas: Priceless.

Proxima Rebellion - A 3D action sim with a hint of strategy

Share this post


Link to post
Share on other sites
What really bothered me about C# is its lame OpenGL support. I might consider going back when that is improved. I was using Tao.OpenGl, which isn''t that bad, but I don''t especially love the entire process of initializing the window, getting input and so forth. This is probably just me, but then again, this is *my* opinion.

Also, does anyone know how to get rid of the visual component? I don''t really like having to ''design'' my window like you do in VB, I''d rather create it in code. Anyone?

---
shurcooL`

Share this post


Link to post
Share on other sites
quote:
Original post by shurcool
What really bothered me about C# is its lame OpenGL support. I might consider going back when that is improved. I was using Tao.OpenGl, which isn''t that bad, but I don''t especially love the entire process of initializing the window, getting input and so forth. This is probably just me, but then again, this is *my* opinion.

Also, does anyone know how to get rid of the visual component? I don''t really like having to ''design'' my window like you do in VB, I''d rather create it in code. Anyone?

---
shurcooL`


Just don''t use Visual Studio and code your GUI by hand. Of course, this takes time and it''s boring.

Share this post


Link to post
Share on other sites
quote:
Original post by shurcool

Also, does anyone know how to get rid of the visual component? I don''t really like having to ''design'' my window like you do in VB, I''d rather create it in code. Anyone?



VS.net places the code generated by ''design'' in the "Windows Form Designer generated code" region. It contians the function InitializeComponent() that the constructor runs.

About TAO.OpenGL, check out the source for the OpenGL form control if you want to change that.

Share this post


Link to post
Share on other sites
quote:
Original post by snyp
Well why don't you show us the last time java goes faster than BASIC... you probably are


I don't understand this sentence.

quote:
well I don't say java sux its just that java was made for the internet...

No. Java is multipurpose, multi-platform compile once for major group language. Java is used on Internet because it has high security and is unlikely to blast your OS out. Actually in comparison to ActiveX problems... it's wonderful for that purpose.
I used Java for single player games and cryptography applications. I also seen TSP solver that did 187-450 under 3 hours.
quote:
why doesn't it stick with it? last time I ran a java compiler... too made out of java(Netbeans) it took about 3 min. to load the resources and I have 1 gig of ram and 2.4 ghz

Why don't YOU support your "opinions" because your a dam hypocrite. >:O


So you claim to have fast computer and you are proud of it. I have celeron overclocked to 458 MHz. I compiled class under 1/2 sec. If you meant a bloated IDE loading issue, or JVM doesn't start with Windows (and doesn't hog memory) issue, then please be more correct next time. (Or use multi-launcher/ IDE designed for "ouch my program didn't load fast enough, there is something wrong with my computer" persons.)

[edited by - raghar on April 17, 2004 6:03:10 PM]

Share this post


Link to post
Share on other sites
I toyed around with both C++ and C#.

I come to like C# for being so fast to work with. I learned it and programmed a bomberman game in under 2 weeks. (during my xmas break).

I used C++ to make a 2d tank game and a small particle engine.

From that, I realized that no matter what language I make a game in, the biggest challenge is in sticking with it and finishing it.

But my preferrence right now is C++. Why? Career-wise I feel as if C++ is a better thing to use for my apps for my portfolio, just because most companies seem to be using that for games.

But the bottom-line is that either one is good for games. You only need to choose the one that best suits your needs. Or use both, which is even better .

Share this post


Link to post
Share on other sites
quote:
Original post by shurcool
Also, does anyone know how to get rid of the visual component? I don''t really like having to ''design'' my window like you do in VB, I''d rather create it in code. Anyone?
You don''t "have" to design your window graphically. All the forms designer does is create the code that represents the graphical form. Windows Forms are very much like Java''s Swing API in terms of designing controls.

Check out .NET Client Web for tutorials and resources on manually creating forms. It''s worth it, if only to give you an understanding of what''s going on behind the scenes.


The FUD quotient in this thread is too high. I wish people would go to the source and read rather than operating on hearsay. It''s also unfortunate that lots of published books and Internet tutorials are just, frankly, bogus. If you want information on Microsoft''s .NET or C#, go to the Microsoft .NET Framework Developer Center and the Visual C# Developer Center FAQ (you should be able to navigate from there to the Visual C# Developer Center homepage, I hope).

Share this post


Link to post
Share on other sites
C# is bad because Microsoft makes it. Plus, it isn''t the language we are used to, which is another reason not to try it.

Share this post


Link to post
Share on other sites
quote:
Original post by PlayGGY
C# is bad because Microsoft makes it. Plus, it isn''t the language we are used to, which is another reason not to try it.

Since this is GD, and I don''t know you, I''m actually not able to discern whether this sarcasm or not.

Share this post


Link to post
Share on other sites
quote:
Original post by Arild Fines
quote:
Original post by PlayGGY
C# is bad because Microsoft makes it. Plus, it isn't the language we are used to, which is another reason not to try it.

Since this is GD, and I don't know you, I'm actually not able to discern whether this sarcasm or not.


It was extremely sarcastic. That should be obvious, but I definitely see where you are coming from, considering some of the posts here...

[edited by - PlayGGY on April 17, 2004 9:19:46 PM]

Share this post


Link to post
Share on other sites
C# is a very NICE language. There are some small performance issues with the delegating system used, but it is mute under only the most pressuring apps. In addition, as one mentioned before you can still write the extreemly time critical code in C++ if your worried about it, but the 5-10% you will save is not necessaraly going to outweigh the MAJOR production gains (of that which most will not argue).
C# is not, as some believe, limited to Windows. The spec is out and there is a compiler availiable for linux (and possably other systems, im not for sure). As well as a usable .NET. The only problem at the moment is the code that relies on the Forms API is not cross-compatable. If only someone would create cross-platform code-common alternatives, we would be all set.

Share this post


Link to post
Share on other sites
quote:
Original post by PaulCesar
C# is not, as some believe, limited to Windows. The spec is out and there is a compiler availiable for linux (and possably other systems, im not for sure).
Mono (Linux, Unix, Windows), dotGNU (Linux, OS X, Windows, PocketPC).

quote:
The only problem at the moment is the code that relies on the Forms API is not cross-compatable. If only someone would create cross-platform code-common alternatives, we would be all set.
Gtk#, Qt#.

Share this post


Link to post
Share on other sites

  • Advertisement