Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

To be fair, C# is ok for game dev, but not great. C# libraries are lagging heavily behind Java.

Want a fastest possible library? It's in C++, and not portable to Win/Mac. So good luck with wrap + porting it.

Want a decent implementation of an algo? It usually exists for Java but not for C#. Hope you like writing it from scratch.

Want a C# implementation of an algo that doesn't allocate to the Nth degree. Again, write it yourself.

But ok, maybe Unity has a good ecosystem... And they fucked it over a barrel.



It is widely better recieved in the AAA gaming developer community than Java, and that is what matters.

I also like Java, but c'mon no decent algorithms being implemented in C#? That is already approaching zealotry.


I didn't say no decent algorithm in C#, but for each performance sensitive algorithm/data structure there is a C and Java implementation at the least ( in my case Roaring Bitmaps).

In C# the solution is half baked or archived or abuses allocation.

I think Unity has way more with C# adoption in game dev than innate C# qualities.


This is a classic case of goalpost moving. The reason why so many algorithms are written in Java especially closer to academic side is because most curriculums in comp-sci often straight up not allow using anything else except Java, Python or sometimes C++. Having C# as an alternative in these is a luxury. There are also more people using Java in general. However, this does not make it a better language at solving these tasks, nor it is any suitable for writing high performance implementations for advanced vectorized algorithms which would push hardware, which is actually what you want when you start caring about such scenarios, which C# excels at.


I'm not moving the goalpost. I explained my examples in another reply. Want to write an engine mostly from scratch in C# and you need libraries that are low on allocation and for niche data/algorithms that games need? You're going to have a bad time(TM).

Sure you could use YAML parser, but it allocates everyone and their mother. Can you find a Fluent localization in C#? Sure, but its outdated and archived. Ok, but basic RoaringBitmap implementation? The repo is archived and not fully complete.

Why C# is used in game dev is incidental. It has more to do with Unity and XNA/FNA than any concrete quality of language modulo value types (but then again, most C# libraries don't focus on avoiding allocation and are just as happy as Java to construct a complicated hierarchy of classes).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: