Game Development 10 min read

The Unexpected Birth of Lua: From Brazil to Global Scripting Success

Lua, a lightweight scripting language born in Brazil in 1993, overcame early obscurity to become a globally adopted tool for game development, embedded systems, and diverse applications, illustrating how a small team can solve a universal need and achieve worldwide success.

Java Tech Enthusiast
Java Tech Enthusiast
Java Tech Enthusiast
The Unexpected Birth of Lua: From Brazil to Global Scripting Success

While most mainstream programming languages such as C, C++, Java, JavaScript, Go, Rust, and Python were created in developed countries, Lua is a notable exception that originated in Brazil, a developing nation.

In the early 1990s, Petrobras needed a domain‑specific language for data input and configuration. Three researchers from the Pontifical Catholic University of Rio de Janeiro—Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes—first created two experimental languages, DEL and SOL, before realizing they needed a true scripting language.

Their solution was Lua, designed to be easily embedded in other applications. For example, a C program could delegate salary‑calculation logic to a Lua script, allowing the logic to be changed without recompiling the host application.

At the time, existing scripting options like Perl, early Python, and Tcl were either too complex or difficult to embed, prompting the trio to create a new language.

Lua was officially released in 1993, consisting of fewer than 10,000 lines of C code (Lua 5.3) and a binary package of only about 200 KB, making it an excellent case study for language design.

Initially, Lua saw limited use within Brazil, but its fortunes changed after articles about Lua appeared in Software: Practice & Experience and Dr. Dobb’s Journal in 1996, bringing it to the attention of the international programming community.

American game developer Bret, impressed by the Dr. Dobb’s article, wrote to the Lua team expressing enthusiasm and announced his intention to replace his company’s proprietary script language with Lua for an adventure game.

At the 1998 Game Developers Conference, Lua was showcased in a talk about scripting languages, sparking excitement among developers. Its small size and speed allowed rapid integration into games such as Grim Fandango, where Lua even enabled coroutine support.

Following this breakthrough, Lua rapidly spread to many high‑profile games—including Half‑Life, SimCity, World of Warcraft, and Angry Birds—and to other domains such as TeX (LuaTeX), Redis, Neovim, Nginx, and even Google Pinyin input method.

Lua’s portability also led to adoption in hardware, appearing in Samsung TVs, Cisco routers, Verizon set‑top boxes, Texas Instruments calculators, and Logitech keyboards, with further growth expected as the Internet of Things expands.

The story illustrates how innovation from a less‑developed region can succeed globally by solving a widespread problem and embracing the internet for dissemination, a lesson contrasted with China’s current lack of a world‑popular programming language.

Reference materials:

https://web.archive.org/web/20181125214924/https://www.foreignaffairs.com/articles/2013-04-21/brazil-wikipedia

https://dcc.ufrj.br/~fabiom/lua_20years.pdf

http://www.inf.puc-rio.br/~roberto/talks/hopl-slides.pdf

Code example from a game script (original formatting preserved): actor guybrush walk-to banana-tree wait-for-actor actor guybrush say-line “Mmm, bananas...” actor guybrush face-camera actor guybrush say-line “Wish I had a banana-picker”

game developmentluaScripting LanguageEmbedded SystemsProgramming Language History
Java Tech Enthusiast
Written by

Java Tech Enthusiast

Sharing computer programming language knowledge, focusing on Java fundamentals, data structures, related tools, Spring Cloud, IntelliJ IDEA... Book giveaways, red‑packet rewards and other perks await!

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.