Re:What's new in C# for Godot 4.0
by mardifoufs on Sunday February 26, 2023 @01:54PM
(#34948215)
I'm completely uninformed about lua, but why isn't it being used more to build games then? I know it's a popular scripting language for games, but are there any engines that mainly use lua (in the same way Unity uses C#)?
Lua very much hit a sweet spot in terms of performance and flexibility for proprietary codebases over the last twenty years. One or two programmers can embed it into an application and expose bindings for designers rather quickly. It’s kind of a min/max of flexibility and engineering work.
As engines became larger products, companies often have the resources to make something bigger for game teams. Unreal’s Blueprints, or Godot’s GDScript integrate much more tightly with the engine’s runtime.
C# being possible to mostly AOT compile (some exceptions) is also an advantage over JS for scripting since JS is not particularly efficient to run in an interpreter and many deployment targets don't allow you to JIT code at runtime. Languages like Lua have much better characteristics for those targets since they have high performance interpreters and cleaner language semantics.