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

As somebody contemplating building a 2D strategy game, how good is the C# support?

This was a killer feature for Unity over Unreal. If Godot has similarly good integration, it looks like a better choice.



It's worth noting that Godot 4 is using actual .NET instead of Mono, so you get all the tooling support that implies, including seamless debugging with Visual Studio, etc. Unity has been promising that transition for years, but I'm pretty sure they're still using some customized version of Mono.

So you can write a game with .NET 7 and everything is great. There's a little bit of extra overhead when making calls into the Godot engine, so you still may want to use bits of C++ for performance where it matters, but otherwise there are only a few rough edges left.


Unity wants to transpile it to C++ code. IL2CPP where they take the IL code of your C# and translate it into C++ for speed. So yeah, not only are they NOT using dotnet tooling but they are going the opposite direction.


It works relatively well, and actually better than in Unity (which use an older C# version), but unfortunately it does not work everywhere. For example, it's not possible to export to the web, which was to me the main show stopper. I needed C# due to some libraries, and I needed that it runs in a browser, so that was game over, no pun intended.

Apart from that, I really preferred Godot over Unity. Faster, more consistent, better learning curve, etc.


Thank you, this is really helpful input. It does seem likely Godot will be our engine of choice.


Are you sure it can't export c# to web? I would have assumed that as true but Godot's documentation does not list that as a limitation, and in fact offers c# code on how to use the JavaScript interop, something that would be pretty meaningless without support.


Yes. https://godotengine.org/article/godot-4-1-is-here/

> Note that as of this release projects made with C# still cannot be exported to mobile and web platforms. We are working on providing the support as soon as possible, but the resolution of this limitation will likely depend on the release of .NET 8 at the end of 2023. This means that the work on enabling mobile and web platforms can only truly start later this year.


It's still a bit janky compared to their own GDScript, but C# is supported yes. Because there are two languages though, and C# is the second class citizen, you won't find as many examples on how to do things in C# as in GDScript.


Thanks for the input. Given my background, I think I can figure out the syntax just fine if necessary. I am just sceptical of languages where typing is not strictly static (and I give a hard pass on pure dynamic typing).


FYI a lot if not all of the core docs actually have tabs on any code samples to switch between c# and gdscript so while tutorials from third parties tend to focus on one or the other, the core docs are a bit better.

I've started going through a tutorial on youtube from I think finepointCGI about a horror game in Godot, he is actually doing it twice, once with GDScript and once with c#, so if you want to see someone with some godot experience using c# give it a look.




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

Search: