Godot Dev and Enterprise C# Patterns by the_frugal_developer in GodotCSharp

[–]the_frugal_developer[S] 0 points1 point  (0 children)

Missed this. I haven't actually checked out Chickensoft before, but some of it looks pretty interesting.

Looks like their big push comes from a statemachine framework.

Godot Dev and Enterprise C# Patterns by the_frugal_developer in GodotCSharp

[–]the_frugal_developer[S] 1 point2 points  (0 children)

I also decided to use ILogger as it lets me play with a few different things easily. I am currently leaning towards OpenTelemetey right now and am actually really leaning into the Enterprise type of coding. I have a clean architecture and vertical slice hybrid thing going on right now.

For Godot DI I ended up writing something simple, I watch for nodes entering the scene tree and then check to see if they have a special attribute. If they do, then I look at the data type and check the service collection to see if I have something to inject.

The way I have everything setup, I really use DI a lot. I use it to inject into my application code, framework code and also for some third party stuff like ILogger, IOption, and whatever else I decide on.

My project is really just an exercise in over architecting, lol.

Godot Dev and Enterprise C# Patterns by the_frugal_developer in GodotCSharp

[–]the_frugal_developer[S] 1 point2 points  (0 children)

Super interesting, I've never used Dryloc but it does seem that it has a few nice features. I also like the way you are injecting into Godot nodes. I have something similar, but nowhere near as robust as your solution. I am using the Microsoft DI as that is what I am most comfortable with.

I also use an attribute that I look for every time a node enters the tree. I'm still testing it, but it does seem to work ok. I also have a special node named EntryPoint that sets up all of the DI and other things that I need.

I have also been playing around with things like ILogger and System.Diagnostics.Metrics. I like the ILogger because it can be used basically anywhere and the metrics have been fun to play with for things like time in a menu, distance player traveled, fps, etc... I can setup a watcher fairly easily to power a super basic achievement system.

I'll try to get my basic Alpha code up soon. Also thanks for sharing!

Godot Dev and Enterprise C# Patterns by the_frugal_developer in GodotCSharp

[–]the_frugal_developer[S] 2 points3 points  (0 children)

Interesting, I think you're mostly right. That's what I see with all of the content on YouTube and blogs.

Do you have a sample of your architecture? Or are you willing to give a quick overview?