Lua GDExtension for Godot 4 #52
gilzoide
announced in
Announcements
Replies: 2 comments
-
Thank you so much! I really needed this |
Beta Was this translation helpful? Give feedback.
0 replies
-
If any of you want to try it out, there are now automated builds for the new project, so that all you need to do is downlod the zip and extract it into your own projects, no manual compiling required! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everybody!
As you may know, the Godot 4 native extension API was reworked from the ground up, so that all Godot 3/GDNative plugins do not work on it without major refactoring.
With that said, I'd like to let you know that Lua PluginScript will not be refactored for Godot 4/GDExtension.
Instead, I have created a new project for Godot 4: Lua GDExtension.
This new project has different design and implementation details, like the following:
Lua as a language for scripts will be implemented at some point, but for now you may already create as many Lua states as you want and interact with them using GDScript.
LuaTable
class, instead of being transformed toDictionary
automatically. There will also be classes for Lua functions, threads (coroutines) and userdata.String
andStringName
variants are automatically unwrapped to Lua strings, to avoid errors when calling Lua functions.This makes it possible to use the latest version of PUC-Rio Lua, as well as other implementations like MoonScript.
Variant
type and makes dynamic calls.This provides a much simpler, smaller and cleaner implementation, as well as being more future-proof.
I know, dynamic calls are supposed to be slower than method bind calls, but done is better than perfect.
It is quite early in development, but with the help of godot-cpp and sol2, the implementation is going quite smoothly.
Of course, the new project is open for contributions, feedbacks, questions, just use the Discussions or Issues tab in the repo =D
That's it, thank you all, I hope you enjoy and I'll see you there!
gilzoide
Beta Was this translation helpful? Give feedback.
All reactions