C++ or C#

Epo

Newcomer
Joined
Jul 29, 2003
Messages
7
Rather simple :) Which do you guys prefer for writing DX apps/games/utilities/time-wasters :)

Until now I've been a devoted C++ fan (VB before that), but the more I look around, the more I see the pound sign instead of two addition signs. :)

So I was just hoping to get some of your thoughts on this. What do you use? Any specific reason? Anything else you'd like to share? :)
 
First of all, Managed DirectX is not as slow as so many people think. It only has about 3-5% loss in performance according to the main Managed DirectX designer Tom Miller (and believe me, he knows what he is talking about!). This loss can be made up with development time descrease and in my opinion better design of DirectX for .NET. Why better design? If you have some kind of an IDE (doesn't matter what, could be Standard Edition of VS) for example you don't have to remeber hundereds of constants like using the SetRenderState method in C++ compared to RenderState in Managed DirectX which is a nice collection of properties. Your application will also be easier to debug, for example creating your own vertex formats that will fit Direct3D or having a list of clearly named structures.
Ultimately your choice will probably be affected which language you like more. For example an experienced C++ DirectX programmer has no reason to move to C#/managed DirectX.
 
I thinks that to really increase the power of .net gaming you must use some COM object for some part of the game. For example collision detection or some particular AI requires some speed. A C++ game use ASM modules, in C#, VB.net or similar the best way is to do all game in .net and this part in COM (you realise it in C and you can also add assembler code). In this way I think that .net is more convenient.
 
C# means I don't have to touch WIN32, and that makes me happy! C# has no pointers, and that also makes me happy. I just prefer managed code. I find it cleaner and easier to debug.
 
To me... Managed code seems much faster than unmanaged code... and c++ has so much overhead, in this day and age I have no paitence for overhead anymore.

What excits me though is that I can use c# or vb.net and actually produce some nice looking directx projects, something that was very difficult with C++ 6 or VB6.
 
It's not DirectX slow but C#. C++ in math calculus is more quick
assembler is a lot more quick
Fuse C# with assembler 'll be the best thing and the link pass trought C.
 
Use the language that you are confortable with. That's the beauty of .NET. I'm confortable with VB/VB.NET and that's what I use to create DirectX project.

You're used to python, perl or any exotic languages? Don't waste time learning C# (actually, you may want to learn it too :) ), use them to create marvellous 3D worlds.

If you really want speed, program everything in assembly. It may takes a century, but it will be the fastest game :p .
 
I've been a VB programmer for almost a year and I'm starting to do Win32. I dunno though, I like C++ alot more than VB now maybe cuz it's new to me, who knows. Anyways, I just learned Direct3D in VB .NET and now I'm learning GDI32/C++ then I'm gonna tackle Direct3D in C++. Just how much faster is C++/GDI32 than VB .NET/GDI+?
 
mutant said:
First of all, Managed DirectX is not as slow as so many people think. It only has about 3-5% loss in performance according to the main Managed DirectX designer Tom Miller (and believe me, he knows what he is talking about!). This loss can be made up with development time descrease and in my opinion better design of DirectX for .NET. Why better design? If you have some kind of an IDE (doesn't matter what, could be Standard Edition of VS) for example you don't have to remeber hundereds of constants like using the SetRenderState method in C++ compared to RenderState in Managed DirectX which is a nice collection of properties. Your application will also be easier to debug, for example creating your own vertex formats that will fit Direct3D or having a list of clearly named structures.
Ultimately your choice will probably be affected which language you like more. For example an experienced C++ DirectX programmer has no reason to move to C#/managed DirectX.


mutant: i agree with you abt all of the above, except a couple things:

even though managed directX may be slow, C#.net's execution of its code isnt, basically the directX code is fast but C#..net's code is not.. but that's jsut me.. lol,
either way, i find that vb.net gives me more than enough speed i need, so unless ur creating some sort of massive game, i'd stick to C#.net
 
C# math calculations are not much slower than C++. Matter of fact, C# is faster than every other language accept C++ when it comes to math calculations.

Want proof? Search google for the benchmarks.
 
ThePentiumGuy said:
really? wow, that's awesome,
does this also include unmanaged C++?

Yes, actually the benchmark I saw showed C# ahead of Gnu C++, it was only beaten by Visual Studio's C++ compiler... This doesn't take into account the affect of garbage collection pauses on performance however. C# is not a good language for say... a first person shooter
 
Back
Top