Lua
In 1993, three Brazilian researchers from the computer graphics technology group at the Pontifical Catholic University of Rio de Janeiro, Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes, were working on computer projects for Petrobras, the national oil company. They had no idea they were about to create one of the most influential scripting languages in video game history.
Between 1977 and 1992, a strict protectionist policy made importing foreign software difficult in Brazil. Local companies had no choice but to develop their own tools. This is how Tecgraf had designed two specialized languages: DEL for data entry, and SOL for generating lithological reports intended for Petrobras. These two precursors contained the foundations of what would become Lua.
The first version of the language merged the capabilities of DEL and SOL into a more general approach. The name “Lua,” which means “moon” in Portuguese, echoes SOL (“sun”), thus creating a poetic continuity with the earlier work. The creators first chose a restrictive license, limiting commercial use, before gradually adopting a more open philosophy starting with version 2.1, and the MIT license in 2002.
Simplicity forms the heart of Lua. The language relies on a few fundamental concepts: tables (associative arrays), functions, and coroutines. This economy of means translates into a remarkably compact implementation of approximately 17,000 lines of C code, capable of running on nearly all platforms, from microcontrollers to supercomputers. But it is primarily its ability to integrate with other languages, specifically C, that constitutes its strength. The interface between Lua and C, called the C API and a central element of the language, transforms Lua into an excellent extension tool for existing applications.
Successive versions mark significant technical milestones. Version 2.1 from 1995 introduced semantic extensibility mechanisms, giving programmers the ability to adapt the language’s behavior. Version 3.0 from 1997 unified C and Lua functions into a single type. Version 4.0 from 2000 completely redesigned the C API to make it more consistent and reentrant. In 2003, Lua 5.0 revolutionized the internal architecture with the introduction of full lexical scoping, coroutines, and a register-based virtual machine, a remarkable innovation for a scripting language at that time.
The video game industry discovered Lua in 1998 when LucasArts used it for Grim Fandango. This pioneering adoption triggered a movement that would never stop. World of Warcraft, Angry Birds, The Sims, and hundreds of other titles integrated Lua to manage their game logic. The reasons for this success? Easy integration, exceptional lightness, satisfactory execution speed, and an accessible learning curve.
Beyond games, Lua established itself in unexpected domains. Adobe integrated it into Photoshop Lightroom, where over 40% of the code relies on this language. It can be found in network routers, digital televisions, scientific instruments, and all sorts of embedded applications. This versatility stems from a particular design philosophy: providing mechanisms rather than imposing policies. Instead of dictating a way to program, Lua offers general tools allowing developers to build their own solutions, whether in procedural, functional, object-oriented, or data-oriented programming.
The language’s development reflects a coherent vision maintained by a stable team since its inception. The creators systematically favor simplicity and consistency over the accumulation of features. Each new version undergoes rigorous testing, with alpha versions already displaying great stability and beta versions being virtually final. This caution guarantees the language’s reliability.
The Lua community is primarily organized around a mailing list created in 1997. This technical forum maintains a high level of discussion while remaining open to beginners. The 2003 publication of the book Programming in Lua greatly contributed to the language’s dissemination and the training of new users.
Lua’s internal architecture testifies to this pursuit of minimalism. The compiler operates in a single pass without intermediate representation, thus efficiently processing large data files. This characteristic proves valuable in the video game domain, where Lua often serves to describe game resources.
The history of Lua demonstrates that a project born from specific local constraints can become a universal tool. Its success rests on clear design principles, rigorous implementation, and a stable development team that never lost sight of the language’s original qualities: simplicity and efficiency. What was meant to be a temporary solution to a Brazilian problem became a worldwide standard, proving that the best ideas sometimes emerge from the most constraining situations.