Hi !
I am considering introducing Lua (luajit) as a second modding language, alongside JavaScript. Here’s why:
performance: Lua is fast, especially for CPU-heavy mods (AI, simulations, etc.), which is critical for large-scale RTS battles.
simplicity: Lua’s lightweight syntax and C/C++ integration make it easier to expose engine features directly to modders.
ecosystem: Lua is widely used in gaming (e.g., World of Warcraft, Roblox) and has robust tooling for debugging and profiling.
sandboxing: Lua’s simplicity allows for tighter security controls, reducing risks of crashes or exploits.
this isn’t a replacement for JavaScript.
javascript mods will continue to work! The goal is to add options, not remove them. Lua could become the preferred language for performance-critical mods, while JS remains great for UI/scripted events.
what this means for modders:
gradual rollout: Lua support would be phased in, starting with experimental access to core APIs.
tooling: we'd provide Lua-specific documentation, debuggers, and compatibility layers for JS ↔ Lua interop.
points for discussion:
are there existing JS workflows we would struggle to replicate in Lua?
is there any other integrations like this one done in the past or abandoned we have notice of, can we learn from it ?
where to start, is there any tips for a unexperienced 0ad "core" dev like me or others wanting to help that we can start learning from ?
other topics of discussion ... please feel free to add and help ?