upvote
A combination of two factors that are rather specific to myself. One being that even tho its quite some time ago i have a bit of c++ experience, while i never tried to code C#. So when i got the idea to try to run the heavy simulation in an "extension" it was just a language i was a bit familiar with. Maybe C# would have been the "smarter" choice, i just never digged into it yet.

The other reason is that in my well closer circle i got quite some people that code c++ on a daily basis and i don't know (at least i think so) anyone doin C# actively, so i thought if i would get stuck i have people i can easily ask about my c++ problems.

So it wasn't a "i think c++ is better than c#" decision rather a what do i know and what resources i have available easily.

reply
C# is mostly in the Unity community. I agree that GDScript performance isn't good.
reply
Godot, Unity, Stride, Flax and even jank niche engines like NeoAxis generally have pretty good C# integration!

If you look more at Stride, you’ll see that even their physics engine is C# which is insane in the best possible way: https://doc.stride3d.net/4.3/en/Manual/physics/index.html and https://github.com/bepu/bepuphysics2

Very cool language and as much of a mainstay in gamedev like something like Lua.

It surprises me that Java never got similarly big despite their GC improvements, though jMonkeyEngine was a nice project last I looked.

reply
Yeah there are some gamedev treasures in C#, owning to the fact that Microsoft created the Xbox Live Indie Games program back in the X360 era, which meant you could ship games to customers with generally little oversight and meddling - this was WAY before Steam did something similar, and even before the iPhone app store.

The catch was that you had to use C# and XNA (which was a wrapper for gaming related APIs like DirectX, XAudio and XInput, generally considered to be very good). This meant there were a lot of hardcore libs made for C# gamedev (BEPU physics is from that era, and there were things like very good UI frameworks).

Tons of games were made with XNA, and its open source ofshoots, MonoGame and FNA power some of the greatest indie hits (Stardew Valley, Celeste, Bastion and other Supergiant titles, Terraria come to mind).

Imo this is one of the main reasons Unity went with C# in the first place.

reply
Historical note that Arena Wars, released in the .NET 1.0 days, with thin bindings to OpenGL, was the very first .NET game, years before XNA.

https://en.wikipedia.org/wiki/Arena_Wars

C# being closer to C++, and .NET having direct support for C++ helped quite a bit regarding adoption among game studios.

Unity started on Mac, and they only adopted .NET when doing the cross platform rewrite.

I also don't remember if there wasn't some Mono advocacy at the time, as they became customers in the process.

Ironically Mono/Xamarin is almost gone from official .NET, all these years after the acquisition, with every modern .NET release, another bit falls off.

We are already on the phase that CoreCLR might take the remaining bits.

reply
C# is a "first class" language in Godot and doesn't need a GDExtension, but it's not compatible with web builds yet. There is a draft PR that includes C# support but it adds about +50 MB to a web export and is also missing a few features.
reply
I did not know that. Thanks for the info. I always use C# with Godot, but never had a use-case where i needed a web build.
reply
And even that doesn't add consoles support, is W4 that far?
reply
Not sure how relevant this is for this simulation use case but IIRC C# has a bigger overhead when communicating with the core engine compared to GDScript or C++.
reply