Since the new rules about scripting languages, I’ve seen quite a few searches here on the blog for Lua and received an e-mail over the weekend about embedding Lua into an iPhone or iPad app . This is not surprising since Lua is a scripting language that is commonly used as a scripting language in major commercial game engines.
In the past I’ve mentioned iPhone Wax which allows you to use Objective-C code in Lua scripts without first registering functions.
iPhone Wax a great project, however what if you wanted to take a more lightweight approach, and embed Lua yourself?
A quick tutorial on how to do just that has been written by GRZ Mobile and can be found here:
Integrating Lua Into An iPhone App
The tutorial goes through the process of embedding Lua within an iPhone application and provides sample code. However, it does not cover the process of how to integrate Lua with C functions but that is covered in the C functions section of the Lua programming guide.
Seeing how time consuming the integration process can be really helps me to appreciate the iPhone Wax project.
©2010 iPhone, iOS 4, iPad SDK Development Tutorial and Programming Tips. All Rights Reserved.
.
Share and Enjoy: