Question:
C# or C++ for game development?
retrogamer4ever
2006-12-26 14:26:48 UTC
I have experience both in C++ and C# (not in game programming though) and it seems that C++ is still considered the stanadared programming langauge for game development. But it also seems that with the release of XNA that C# is slowly starting to become the next main stream game development language of choice. I was going to start creating a game and even though I enjoy C++ I have become very fond of C#, because so much code has already been done for you (thank you .NET). Which should I use to start developing my game?
Five answers:
DarkAardvark
2006-12-26 16:02:47 UTC
definitely C++. C# has no where near the power as C++. the only real reason microsoft is allowing people to use C# for their 360 programming XNA stuff is because it is so weak and limited and will make hacks and such harder to create. personally, i prefer java XD
csanon
2006-12-26 17:04:44 UTC
You can use either for game development. Some points people raise:



C++ is faster: Technically C++ is faster than C#. Consider the following, though. C# has a very good JIT compiler. To match the optimizations from C#, C++ itself needs to optimize properly. But with C++, you distribute pre-compiled code, which means you don't optimize as accurately and effectively as the JIT compiler, unless you decide that your program only runs on so and so type of processor. So C# is comparable or sometimes better than C++.



Properly optimized C++ code will still win, and this is usually in something low level like OS programming, drivers, and APIs between hardware and software. But with game development, you aren't making drivers or APIs. Rather, you are just using them.



Available libraries: People say C++ has more libraries for use. Yeah, or to be more accurate, C has more libraries. And given that C has been around for so long, that's obvious. C# is quite recent, and even then, it has a number of supporting libraries for game development. Many libraries and APIs for C/C++ have already extended support to C#. Pretty impressive.



C# is definitely becoming a language of choice. Actually, modern C++ has very powerful generic programming semantics, but any serious and advanced C++ programmer should be able to appreciate the usefulness of C#. It's a modern language with modern semantics, with points like documentation and unit testing in mind.



So again, either one.
Oleg T
2006-12-26 16:32:23 UTC
What kind of game? For FPS (3D shooters) and simulators definitely C++, for puzzle games like Tetris, Chuzzle C# is more preferable.

Another problem is software protection - if you create a shareware game then you should use C++ because you can not protect C# application from reverse engineering.
turcotte
2016-10-06 05:21:36 UTC
i choose for to propose against employing C# in any respect in case you could steer clear of it. no longer with the aid of fact it incredibly is inherently undesirable (i does no longer be attentive to, i've got no longer used it myself), yet with the aid of fact it incredibly is geared up on a proprietary framework controlled by employing Microsoft, while Java, C++, etc are open frameworks. it is not good whilst your utility grants up working without warning in simple terms with the aid of fact bill Gates pressed a huge pink button someplace whilst guffawing maniacally. additionally, C++ is decrease-point and as a result quicker for many applications, and once you're doing interest programming, you pick for the greater beneficial speed. this is extremely actual for 3-D video games, which Java is to no longer boot ideal for.
Just David
2006-12-26 15:05:42 UTC
C++, and not .Net...you'll never get the performance out of the .Net framework...



.Net framework is good for productivity apps and so on, but high performance it is not...


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...