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

As much as I'm looking forward to 4, has GDExtension been stabilized / documented yet? I know there's the existing C++ example [1], but I really, really don't want to jump through a scons & C++ project simply to call a single native function in a DLL. You can do such a thing with GDNative, and I presume that it is possible in GDExtension as well, though it isn't obvious how to do so. This strikes me as a huge barrier to adoption, since GDNative is one of the big things that will be incompatible with 4.

[1] In the godot-cpp library: https://github.com/godotengine/godot-cpp



There's an ongoing discussion at [1, 2] which highlights an important difference between GDNative and GDExtension in terms of what the developers expect them to be used for. A lot of people were using GDNative as a way of writing game logic in other programming languages (particularly I've seen this with Rust), but GDExtension seems to be designed to allow people to write editor plugins (e.g. things like a voxel node type, or a custom GUI tool). Each pligin currently seems to provide a custom Node in its own right, not the ability to hook into existing nodes.

This is why at the moment, you cannot live-reload a compiled GDExtension library, as the assumption is that it's a product that being provided to the user of the editor, not something which the game developer is directly creating.

I think there might be some mechanisms/hooks to allow this to work as wanted, but it has to work quite differently.

[1] https://github.com/godotengine/godot-proposals/issues/4437 [2] https://github.com/godotengine/godot/issues/66231


Faolan-Rad and I (fire) are working in that area https://github.com/godotengine/godot/pull/72883 "LibGodot is a system to allows Godot to be compiled as a library and connected into it using GDExtensions by giving a function pointer to the entry point of a GDExtension implementation"


Yes, I was in the first category of people, where I am using GDNative to ultimately call a single function written in Go, not due to speed, but simply in order to leverage a huge amount of code I had already written in that language. Judging by the GDExtension headers, I can probably pull off something similar if I forgo all of the C++ bindings that I don't need. However, I am hesitant to dedicate any time to doing so at the moment.

Don't get me wrong, GDExtension seems awesome, but it's also true that it doesn't seem geared towards the case that I was using GDNative for.


I've seen on their Discord where before they release the next version they call upon the community to help document all the new features before release if I remember correctly. Maybe a good issue to bring up before it gets looked over.




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

Search: