O'Reilly logo

Cocos2d for iPhone 1 Game Development Cookbook by Nathan Burba

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Running a Lua script

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.

Running a Lua script

Getting ready

Please refer to the project RecipeCollection03 for full working code of this recipe.

How to do it...

Lua can be added to your project in a few simple steps:

  1. Highlight your project in the Navigator. At the bottom of your window in the middle, click Add Target:
    How to do it...
  2. Name the target "Lua". This will create a new folder inside your project folder ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required