Hello Lua

2011-08-11
~
2 min read

Back in the day, when I used to play World of Warcraft (oh, well), I noticed they use something called Lua to let players extend their user interface with various addons and tweaks. It worked very good. There are literally thousands of available addons for World of Warcraft. I quit the game about 2 years ago and I never got to look further into Lua, until now.

As it turns out, Lua is quite popular among game developers as an extension scripting language due to it’s C API. Common practice is to implement the engine and some basic game features in C++ and then script all the content in lua. That way it’s easier to tweak the game, because it’s not hard-coded and compiled. As the official website says:

Lua combines simple procedural syntax with powerful data description constructs based on associative arrays and extensible semantics. Lua is dynamically typed, runs by interpreting bytecode for a register-based virtual machine, and has automatic memory management with incremental garbage collection, making it ideal for configuration, scripting, and rapid prototyping.

Sounds pretty neat. And on top of that, lua is open-source. It’s distributed under the MIT license!

Further Reading