Godot Engine

Godot Engine

JW 14. juni 2020 kl. 8.23
Godot Lua Lanuage Support
Hi godot team. Will you add lua support someday ?
Sist redigert av JW; 14. juni 2020 kl. 8.25
< >
Viser 16 av 6 kommentarer
Romløk 14. juni 2020 kl. 8.43 
It's unlikely that Lua will be officially supported by the core of Godot, since they prefer to keep the core lightweight, and they already have a scripting language in GDScript.

However, the engine does provide interfaces which make it possible to create bindings for other languages, and it looks like at least one person has already been working on Lua support: https://github.com/perbone/luascript
Sist redigert av Romløk; 14. juni 2020 kl. 8.44
JW 14. juni 2020 kl. 8.48 
Opprinnelig skrevet av Romløk:
It's unlikely that Lua will be officially supported by the core of Godot, since they prefer to keep the core lightweight, and they already have a scripting language in GDScript..
However, the engine does provide interfaces which make it possible to create bindings for other languages, and it looks like at least one person has already been working on Lua support: https://github.com/perbone/luascript

yeah, but gdscript isn't better than lua, I would like the game to pick up lua scripts after compilation, and not in the editor itself like GDscript
Baroon Valm 14. juni 2020 kl. 8.58 
Nintend01337 if i understand what you want, it is possible to make the GDScript export in non compiled form if that is what you mean.
N0P3 14. juni 2020 kl. 9.05 
GDScript is specialized thus IS better than Lua within its context.

Lua is general purpose and can be compiled into a C API binary of which GDNative supports (C API) - I might suggest reading up a bit on the Godot docs. As far as native support is concerned LUA is once again too general purpose, but I do believe that Godot supports plugins thus you could technically develop or even branch Godot to support Lua - actually think that Lua fans would appreciate a fork of Godot for the language. Maybe one feeling really compelled would go raise hell on the Lua user forums about getting such a project rolling out ;-)

Lua's cool, but like I said its just too general purpose. Regardless, if interest grows it could eventually happen. Anyway, happy coding and dev-ing.
flesk 14. juni 2020 kl. 11.33 
Godot actually used Lua in the early days, but it proved to not be a good fit for the engine, as mentioned in the FAQ[docs.godotengine.org]:

In the early days, the engine used the Lua scripting language. Lua is fast, but creating bindings to an object oriented system (by using fallbacks) was complex and slow and took an enormous amount of code. After some experiments with Python, it also proved difficult to embed.

The main reasons for creating a custom scripting language for Godot were:

  1. Poor threading support in most script VMs, and Godot uses threads (Lua, Python, Squirrel, JavaScript, ActionScript, etc.).
  2. Poor class-extending support in most script VMs, and adapting to the way Godot works is highly inefficient (Lua, Python, JavaScript).
  3. Many existing languages have horrible interfaces for binding to C++, resulting in large amount of code, bugs, bottlenecks, and general inefficiency (Lua, Python, Squirrel, JavaScript, etc.) We wanted to focus on a great engine, not a great amount of integrations.
  4. No native vector types (vector3, matrix4, etc.), resulting in highly reduced performance when using custom types (Lua, Python, Squirrel, JavaScript, ActionScript, etc.).
  5. Garbage collector results in stalls or unnecessarily large memory usage (Lua, Python, JavaScript, ActionScript, etc.).
  6. Difficulty to integrate with the code editor for providing code completion, live editing, etc. (all of them). This is well-supported by GDScript.

GDScript was designed to curtail the issues above, and more.

There are a couple of popular game engines which use Lua though:


The former is free and open source (FOSS, like Godot), while the latter is source-available (like UE4).
Sist redigert av flesk; 14. juni 2020 kl. 11.46
nxfs11 16. juni 2020 kl. 15.52 
leadwerks works with lua
< >
Viser 16 av 6 kommentarer
Per side: 1530 50

Dato lagt ut: 14. juni 2020 kl. 8.23
Innlegg: 6