1
\$\begingroup\$

I am wondering if the performance of unmanaged languages like C++, Rust etc. is relevant when developing a game server or is it more about the network. For game clients, it makes sense and is probably preferred.

Do you think using C# or some language like even Python would be comparable to writing game server in C++ or some other natively-compiled language?

\$\endgroup\$

closed as off-topic by Philipp, Vaillancourt Oct 8 '18 at 13:17

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about "how to get started," "what to learn next," or "which technology to use" are discussion-oriented questions which involve answers that are either based on opinion, or which are all equally valid. Those kinds of questions are outside the scope of this site. Visit our help center for more information." – Vaillancourt
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    \$\begingroup\$ Networking apart, it's likely that a server written in C will perform better than a server written in C#. Like always with performance, you need to weight your options and in the end it always depends of the game itself. Most of the times servers are running on powerful machines and I would say that the most important factor for servers is bandwith optimisations. \$\endgroup\$ – nathan Oct 8 '18 at 9:52
  • 2
    \$\begingroup\$ You can't generalize this. It depends on your game and how much computation you do on the server-side. Also, the skill of the programmers is far more important than the language implementation. Well-written C# code can be orders of magnitude faster than badly written C code. \$\endgroup\$ – Philipp Oct 8 '18 at 10:09
  • \$\begingroup\$ I think you mean code interacting with the network will perform better, I don't think it will affect the network speed. But C# is JIT'ted, also you don't need to care about the memory. I don't think it matters much, game servers are usually not compute-intensive, unlike clients. They're just meant to receive and broadcast packets and maybe persist the data somewhere. I think you can easily create scalable game server with C# working for 100.000-1 000 000 players and more. \$\endgroup\$ – Konrad Oct 8 '18 at 10:12
  • \$\begingroup\$ "I don't think it matters much, game servers are usually not compute-intensive, unlike clients. They're just meant to receive and broadcast packets and maybe persist the data somewhere." Have fun with all the cheaters. No, really, the gameserver computes all the things in its world. When the client simulates physics for its own character and its surroundings, the gameserver physically simulates possibly hundreds of thousands of entities, evalutes AI, receives and transmits thousands of packets and validates them, each tick. \$\endgroup\$ – tkausl Oct 8 '18 at 13:19
  • 3
    \$\begingroup\$ Chandler Carruth had a good point in one of his CppCon talks, saying "C++ does not give you performance. C++ gives you control over performance." Whether that kind of control is necessary for the specific kind of bottleneck you're experiencing/anticipating isn't something we can answer without seeing this bottleneck demonstrated. It might be something you can cut down to size with a better choice of architecture, algorithm, or data structure — transformations you can make in practically any language. \$\endgroup\$ – DMGregory Oct 8 '18 at 15:09