Lua is a powerful extension language with many game-oriented uses. It is fast, small, portable, extensible, and trivial to integrate with existing applications. Originally designed as a configuration language for a joint project between the Computer Graphics Technology Group (TeCGraf) at the Pontifical Catholic University of Rio de Janeiro (PUC-Rio) and PETROBRAS, the Brazilian Oil Company, Lua can be found in programs ranging from 3-D modeling applications and web server extensions to computer games.
Lua's light weight and speed make it an ideal candidate for an extension or prototype language for games.
My discussion will be divided into two parts:
- An overview of the Lua language, including data structures and control flow, along with Lua's novel type definition and operator overloading system: "tag methods".
- Integrating Lua into your application. Basic hooking of C and C++ functions into Lua's runtime, including discussion of the Lua call stack, accessing Lua global and local variables, tables and other objects.
The talk is targeted at C and C++ programmers of intermediate to advanced level who have some experience with a scripting language. My disucssion is generally architecture and platform neutral, however my platform of choice is Win32/VC6.