Why C# is good for developing videogames? | SoloLearn: Learn to code for FREE!


Why C# is good for developing videogames?

I have read some posts on Internet and C# is supposed the best language to develope videogames, but why? Those posts don't specify why C# is better than other, just light orientations. Some professional can explain why? Please. I am learning C# and videogames look a good way to improve and motivate my learning. Thanks!

6 Answers

New Answer


A lot of people use the unity game engine which uses C# as its scripting language so they naturally think C# is the best. The truth of the matter is that the unity game engine is written in C++ but some folks don't know the difference between the engine core and the game scripts. The vast majorty of high performance video game engines are written in C or C++. Having a scripting language built into a game engine allows a certain amount of customisation without the need to recompile the engine and many game engines provide one or more scripting languages. Earlier game engines would often have a proprietary language such as unity script, torque script and gd script. Recently the trend is to leverage the existing code base and programmer knowledge of a more popular language such as C#, Python, JavaScript, Lua etc.


To add to the answer Martin Taylor gave (you should mark it correct), C# is _not_ the best game language because, like Java, it has a runtime requirement, but unlike Java, C# Runtime is not multi-platform. Java runs on Windows, Linux, UNIX (*BSDs, MacOS, et al)... And that's just Java SE. Now some will argue C# has stuff like Mono for Linux and non-MS OS users. But C# was designed for MS. Overhead aside, you're putting a square peg in a round hole. Now let's discuss practical use. C# is not designed for game dev. Period. Firstly, it has quite noticeable overhead. Secondly, Unity 3D is about the only major engine supporting it (for scripting). Far better choices off the top of my head: SFML (C/C++/Python) SDL (C/C++) PyGame/Ren'Py (Python) OGRE (C++) Unreal Engine 4 (C++) What do the above all have in common? They were designed to be multi-platform, most designed mainly for game dev.


In fact, I would ask not about language, but about game engines. There are many of them. However, in professional studios, Unity and Unreal are most commonly used. Therefore, they can be considered the best for this. By the way, nonzyro there have been a lot of changes in the .NET world lately: the Roslyn compiler, .NET Core has appeared ... Now you can also join the development of this platform https://github.com/dotnet


He is very good on windows.


Because there is a game making tool name ‘unity3d’


Good question! 👍 Can you please edit your question and remove 'posts' from Relevant Tags (irrelevant). And optionally, (if you want to focus the question on C# language alone) also take 'C++', 'C', 'Java' out of the tags.