Lua The Favorite Language for Game Developers


(T) The popularity of Lua is huge among game developers. Lua has been used by many game programmers, from Angry Birds to Bubble Ball (the popular iPhone game from 14-year old Robert Nay). Roberto Lerusalmischy, the author of Lua, was teaching, this quarter at Stanford University, a computer science class, and presented some of his thoughts about the design of Lua (Some Thorny Points in the Design of Lua: ws2011).

The originality of Lua is its ability to reuse existing code, adapt and reshape that code. Lua provides a component-based approach to software development. A Lua application consists of high-level components that are written in C/C++, and are unlikely to change during the development of the application. Lua is simple: a 14 years old teenager can develop a popular application in Lua. Lua has among the scripting languages an efficient implementation. Lua can be extended through external C/C++ libraries – Lua itself implements most of its own functionality through external libraries. Finally, Lua is very portable, providing the same code across virtually all platforms, even MS-DOS and old IBM Mainframes.

Those four major characteristics are a perfect match for the needs of game developers who have many native C/C++ libraries that provide all the basic low-level functions required for their games. Game developers use Lua to design or update a game while re-using all their C/C++ libraries for the fabrics of the game itself such as physics engines, graphics, and animations, interfaces and networking, ads and analytics, hardware and platform specific libraries for storage etc…The game is designed in Lua but most of the code generated by the game and executed by the CPU is in C/C++.

Sample Code


Copyright © 2005-2012 by Serge-Paul Carrasco. All rights reserved.
Contact Us: asvinsider at gmail dot com.