Many commercial games make use of a scripting language to isolate and abstract their game logic. The most popular of these is Lua. In this recipe, we will integrate Lua into our project.
Lua can be added to your project in a few simple steps:
Highlight your project in the Navigator. At the bottom of your window in the middle, click Add Target:
Name the target "Lua". This will create a new folder inside your project folder next to your main target's similarly named folder. It should also create a new group.
Download the Lua source from http://www.lua.org and copy it to this folder.
Right-click the Lua group and select Add Files to " Your Project ":
Navigate to the
src
directory and add all the files located there except forlua.c
,luac.c
,Makefile
, andprint.c
. Also, be sure to uncheck Copy items into destination groups folder and select only Lua under the Add to...