▲ 36 r/godot

I made a Godot comparison Demo GDscript/C#/Nodes/MultiMesh/Threaded performance

This is one of the Godot demos for my Entity-Component System, fennecs, running in a Godot 4.7.1 export.

People kept asking about use cases and performance expectations, and there's also always the discussion whether C# gives or doesn't give you tangible performance gains.

It sure does!

I usually reply to these that if you manage most of your state in C#, then the sky is the limit (... though, actually, memory bandwidth for marshalling the data back into Godot when you need it there).

fennecs is a free & open source ECS I made specificall with Godot in mind, but it works for most modern C# engines. (the upcoming v0.7.x requires .NET 10)

Since an ECS enables you to keep data contiguous in memory, yet composable, it's possible to build complex game mechanics and still submit it all to Godot in one fast memory copy. You can do your calculations on the C# side as fast as RyuJIT and multi-threading lets you (or even resort to using SIMD intrinsics), and then you copy it all back into your engine view.

Another popular question is, "but GPU can do this better", and I say "yes, but what about a second processing unit that just works where your game actually does its work?"

All of these cubes here could be anything, really... animals, bullets, zombies, NPCs. I just chose a colourful visualization because math is beautiful.

PS: One thing really surprised me - Godot GDscript Multi threading kicks ass! If anything, use that more in your games. 😉

u/thygrrr — 18 days ago
▲ 81 r/GodotCSharp+2 crossposts

2dog - C# Godot Games on the Web

Let me tell a classic "tiger scope creeps again" story, fortunately one that ends in success...

Late last year, I needed a way to run my Godot tests in MTP (microsoft test platform) runners, e.g. in Rider and Visual Studio.

I ultimately ended up building a way to run and publish Godot from inside .NET, including to HTML5 (yes, for C#!). And on top of that, I'm getting close to releasing a C# GDextension (GodotSharp compatible as well).

This is free and open source (MIT license) for the community, I'm doing this out of my love for the game engine.

Steal the source: https://github.com/outfox/2dog Read the dogs: https://2dog.dev

If you have a C# game you want on the web, try 2dog out or message me here or on the outfox/2dog discord (linked on the page) if you get stuck. I'm trying to make this as easy and solid as possible, and need your feedback!

2dog.dev
u/thygrrr — 6 days ago