One bit of info missing from my side.
We did not move earlier to Jolt because it simply wasn't ready to be a replacement.
It missed a lot of stuff, but the Jolt author worked really hard into adding everything that Godot needed the past months and is now pretty much fully usable.
Unlike the Bullet author, the Jolt author is very interested about it being used in Godot, so this gives us a lot more peace of mind.
That is never going to happen because those are C# types and Godot is a C++ game engine. Godot internally uses its own data types, not C# types.
This way, if you pass something native to C# to Godot, even if the exposed API to C# is native, internally Godot will have to convert it to its own formats. The conversion is 100% unavoidable here.
That said however, is not much of a problem in practice:
The idea is that you can use Godot.Collections.Array and interact more efficiently to Godot datatypes. Conversion or not, the APIs using these are not critical.
For performance critical API you will be able to use either Span or T[] using a special binder.
To clarify, nothing in the C++ API of Godot will change. The C++ side of Godot already uses pointers where it needs to be fast and higher level structures where it does not matter. That part is already OK.
The changes are more to make the language binder closer to the C++ side in Godot.
I think you are entirely missing the point here. It is true that there are cases where it would be more optimal to use Span<> in C#.
But these are the coincidentally same cases where the Godot C++ API uses a pointer directly: Critical functions that you want to call very often and you can't give yourself the luxury of allocating memory.
So ultimately, it is not that the C# binding is implemented inefficiently, this is more of a problem with how Godot exposes those functions to the binder layer in general. It's a small bunch of cases that are well known but require a separate approach in the binder to handle properly.
Currently, these corner cases were worked around for GDScript with a less efficient binding, but the idea is that they use more specialized binding code in both C++ and C# that is more performant.
The rest of the API (the large majoroty of it), Godot uses PackedArrays too for C++ because these are absolutely not performance critical areas in any way.
The point of the article was to refute that the majority of the API is inefficient or designed around GDScript.
What you are mentioning is that there is a part of the API that is inefficient, that is acknowledged in the article already and something that will be improved eventually.
As I mentioned in the article, the built-in types are used for storage, transfer, introspection, editing and language bindings.
In none of those cases SIMD is relevant. SIMD is relevant inside a function doing something optimized, in which case Godot is not restricted to use the built-in types and can use anything.
You are correct, this is one of the main reason we created the low level type binders, so these APIs can be properly exposed to languages such as C#, C++, Rust etc.
Its just that this work has not been completed yet, hopefully should be soon.
Well, English is not my native language, and the least thing I want is people think the original article was done with bad intention, so I did what i could, sorry if it was jarring to you.
"Cherry picking" is a section in the original article, I was merely referring it to it.
Give us a bit of time. Everything is kind of a mess because of the suddendly increased interest of several users and companies on the C# side. This work has to be properly organized but the general idea is that funding will be used to make sure all works as smooth as possible.
This article is very interesting. Just want to note that this is something we are aware of and the intention is to work it on in two fronts:
From the binder API, adding a struct type, to pass these results more efficiently.
The GDExtension side can already expose these structs to the binder API with a proper layout description, but the C# in support has not been moved to it yet (its one of the missing steps to merge both the C# and C++ editor).
So basically, this area of the engine is a work in progress. Fortunately there is not a lot of the API exposed this way, the majority uses more efficient interfaces. This is more part of the legacy code that is being modernized.
<randomperson1> Godot 3D capabilities are so far behind <insert engine> it's not even fun, they have an army of programmers and millions in the bank. Godot does not, they will never be able to catch up in rendering features.
That's kind of the problem. When I wrote it (Godot was not even open, just internal doc), it was not intended to be a political statement, just an internal joke. Over time, the popularity of the engine made the community blow this totally out of proportion.
We hired him long ago to work on the GLES2 renderer for Godot 3.0. Because there were no rendering contributors we offered him to train him on this. He did a great work, but due to the high demand of rendering guys in general, he ended up moving to a company that paid him much better. I suppose that warning is from before that time.
In the end I completed the GLES2 renderer (which is now maintained by clayjohn and lawnjelly), but it seems I completely forgot about this function.
When you hire somebody, if you don't have experience working with this person, the chances the work will be done properly is usually very low, hence the risk is high.
The quality of work has to be very good
The rate at which content is produced has to be good, most contractors slow down with time. Many, if not involved enough, use the financial security to look for other jobs that pay more and toss you aside, leaving unfinished work.
The work must be done without requiring time from other contributors. If this person needs a lot of feeback, help, reviews, etc. and ends up slowing down other paid contributors, its a problem because productivity goes negative. This is one of the reasons why we only take the bare minimum students for GSOC, as contributors end up spending a lot of time with them.
So, as I mentioned, its not so simple to deal with paid people and there are always different types of risks. This is why we only hire contributors who have proven themselves and are truly involved with the project. There is zero intention of burning donation money in taking chances.
We are going to hire someone to improve the documentation system in the coming weeks (hope to do the announcement soon). This will probably also help as the idea is to either link the QA to the documentation (including the class ref), or add some sort of feedback system like notes. This will help the community share knowledge better when there are missing doc bits or something is not clear.
We don't like using funds this way because just hiring someone you don't have experience with often goes wrong. I know that for many donating, besides being a sacrifice, its a way to show trust, so we only really spend money when we trust 100% that person hired will do a good job.
This is why, with contributors, we only hire those who have proven to do very good contributions over a long period of time instead of people we don't know. We hope they prove their worth before we can use money for something like this.
If someone who does great tech writing comes and does very good contributing to class ref, we would not even doubt about paying this person, or even crowdfund if needed, so this contributor can spend more time on it. This is what we are doing with RTL support now basically, but someone has to prove they can do the job very well first.
Godot supports a proper standard asset format that supports PBR (GLTF2), so asset makers don't even have to bother making their assets for Godot.
All they need to do is make them GLTF2 and be it.
One bit of info missing from my side. We did not move earlier to Jolt because it simply wasn't ready to be a replacement.
It missed a lot of stuff, but the Jolt author worked really hard into adding everything that Godot needed the past months and is now pretty much fully usable.
Unlike the Bullet author, the Jolt author is very interested about it being used in Godot, so this gives us a lot more peace of mind.
That is never going to happen because those are C# types and Godot is a C++ game engine. Godot internally uses its own data types, not C# types.
This way, if you pass something native to C# to Godot, even if the exposed API to C# is native, internally Godot will have to convert it to its own formats. The conversion is 100% unavoidable here.
That said however, is not much of a problem in practice:
To clarify, nothing in the C++ API of Godot will change. The C++ side of Godot already uses pointers where it needs to be fast and higher level structures where it does not matter. That part is already OK.
The changes are more to make the language binder closer to the C++ side in Godot.
The Godot API by default does not use pointers for anything (except objects). It only does where performance is important.
I think you are entirely missing the point here. It is true that there are cases where it would be more optimal to use Span<> in C#.
But these are the coincidentally same cases where the Godot C++ API uses a pointer directly: Critical functions that you want to call very often and you can't give yourself the luxury of allocating memory.
So ultimately, it is not that the C# binding is implemented inefficiently, this is more of a problem with how Godot exposes those functions to the binder layer in general. It's a small bunch of cases that are well known but require a separate approach in the binder to handle properly.
Currently, these corner cases were worked around for GDScript with a less efficient binding, but the idea is that they use more specialized binding code in both C++ and C# that is more performant.
The rest of the API (the large majoroty of it), Godot uses PackedArrays too for C++ because these are absolutely not performance critical areas in any way.
GDScript uses the Godot memory management model, so you still don't really have to care much about allocations and memory management.
Just for the record, that is a comment from 2016 before GDScript had static typing.
That is no longer the case today, so a JIT will provide huge amounts of performance improvements for your typed code.
The point of the article was to refute that the majority of the API is inefficient or designed around GDScript.
What you are mentioning is that there is a part of the API that is inefficient, that is acknowledged in the article already and something that will be improved eventually.
As I mentioned in the article, the built-in types are used for storage, transfer, introspection, editing and language bindings.
In none of those cases SIMD is relevant. SIMD is relevant inside a function doing something optimized, in which case Godot is not restricted to use the built-in types and can use anything.
Yeah, this would allow the use of pointers in some situations in the C++ API (and probably exposed as native Spans at the C# level).
You are correct, this is one of the main reason we created the low level type binders, so these APIs can be properly exposed to languages such as C#, C++, Rust etc.
Its just that this work has not been completed yet, hopefully should be soon.
Well, English is not my native language, and the least thing I want is people think the original article was done with bad intention, so I did what i could, sorry if it was jarring to you.
"Cherry picking" is a section in the original article, I was merely referring it to it.
We have a good bunch, but there could always be a lot more: https://docs.godotengine.org/en/stable/contributing/development/core_and_modules/index.html
Give us a bit of time. Everything is kind of a mess because of the suddendly increased interest of several users and companies on the C# side. This work has to be properly organized but the general idea is that funding will be used to make sure all works as smooth as possible.
This article is very interesting. Just want to note that this is something we are aware of and the intention is to work it on in two fronts:
So basically, this area of the engine is a work in progress. Fortunately there is not a lot of the API exposed this way, the majority uses more efficient interfaces. This is more part of the legacy code that is being modernized.
Work on improving compile-out options and general engine shrinking will be done post 4.0.
Yeah that will have to be changed somehow, likely making inherited nodes look a bit different.
<randomperson1> Godot 3D capabilities are so far behind <insert engine> it's not even fun, they have an army of programmers and millions in the bank. Godot does not, they will never be able to catch up in rendering features.
<randomperson2> But, what's missing exactly?
<randomperson1> Everything! Like.. uh.. eh.. Occlusion Culling!
<randomperson2> Oh yeah, lightyears away for certain.. that's worrying.
That's kind of the problem. When I wrote it (Godot was not even open, just internal doc), it was not intended to be a political statement, just an internal joke. Over time, the popularity of the engine made the community blow this totally out of proportion.
s/ways/weeks.
Eep. This is my fault, not karrofel's.
We hired him long ago to work on the GLES2 renderer for Godot 3.0. Because there were no rendering contributors we offered him to train him on this. He did a great work, but due to the high demand of rendering guys in general, he ended up moving to a company that paid him much better. I suppose that warning is from before that time.
In the end I completed the GLES2 renderer (which is now maintained by clayjohn and lawnjelly), but it seems I completely forgot about this function.
It unfortunately does not work like that.
When you hire somebody, if you don't have experience working with this person, the chances the work will be done properly is usually very low, hence the risk is high.
So, as I mentioned, its not so simple to deal with paid people and there are always different types of risks. This is why we only hire contributors who have proven themselves and are truly involved with the project. There is zero intention of burning donation money in taking chances.
We are going to hire someone to improve the documentation system in the coming weeks (hope to do the announcement soon). This will probably also help as the idea is to either link the QA to the documentation (including the class ref), or add some sort of feedback system like notes. This will help the community share knowledge better when there are missing doc bits or something is not clear.
We don't like using funds this way because just hiring someone you don't have experience with often goes wrong. I know that for many donating, besides being a sacrifice, its a way to show trust, so we only really spend money when we trust 100% that person hired will do a good job.
This is why, with contributors, we only hire those who have proven to do very good contributions over a long period of time instead of people we don't know. We hope they prove their worth before we can use money for something like this.
If someone who does great tech writing comes and does very good contributing to class ref, we would not even doubt about paying this person, or even crowdfund if needed, so this contributor can spend more time on it. This is what we are doing with RTL support now basically, but someone has to prove they can do the job very well first.