-
Notifications
You must be signed in to change notification settings - Fork 35
Move to GDExtnension #54
Comments
This may not actually be very feasible. Currently GDExtension does not support CallableCustoms which means we would lost the LuaCallable type. On top of that it appears to not support protected calls on any callable. Which means we would not get error handling for lua calling GD functions. |
For the time being we will remain a module. |
I'm going to take another look at this. I think I can find a suitable work around. Main issue right now is there does not seem to be away to create our own callable type. We could look for alternative methods but this has made connecting Lua functions to signals very easy. So it would be a shame to lose them. |
IIt would be awesome especially now that updates are coming frequently, because recompiling each time for each platform... That's painful. |
Here is my current plan regarding this, once we finish bringing the documentation up to date, finish writing the tests as well as #63 / #64 I am going to ask in the godot rocket chat if it is possible. because like you I am very new to GDExtension and there is very little documentation for it right now. If it turns out its not possible I will create the best work around I can come up with. At that point we will determine if it is worth it or not. I understand the pain of recompiling so I really would like to make the move. |
Small update. I'm almost done wrapping up #63 and #64. I have asked in the godot rocket chat if a method exists, however after looking again I'm fairly confident one does not. So the best work around I have come up with would be to change the type of LuaCallable from CallableCustom to RefCounted. Then we can return a Callable with the object set to the "LuaCallable". This would work but does not feel the cleanest. If anyone had other ideas I am all ears. |
One other thing. I also do not want to drop module support. We can use compiler defs so it will build for both. Similar to how godot_voxel does it. |
This probably wont be worth looking into much more until godotengine/godot-cpp#802 is resolved. |
We can work around 802. I'm waiting on this PR then I think it should be possible. |
In order to get the ball rolling on this, I am going to maintain a fork of godot-cpp with #1017 applied. As well as any other patches we may need. As GDExntension its self seems to work fine. But godot-cpp is getting not love at all since the release of godot 4.0 |
GDExtension looks great! And will allow for much easier inclusion of our api in games. It seems to be pretty flashed out now and works closely to how modules do. This should be done before v2.
https://godotengine.org/en/article/introducing-gd-extensions
The text was updated successfully, but these errors were encountered: