Step-by-step instructions for a Cocos2d-x/LUA setup on OSX?

I’m new to Cocos2d-x, and I’d like to use the LUA extension to create Cocos2d-x based mobile games on my Mac. I’m struggling to find how to get it all set up though. Many of the links I follow on the Wiki end up at empty placeholders.

Is there a step-by-step guide to getting Cocos2d-x working with LUA in OSX?

I’ve downloaded the latest release, but I could see no mention of LUA in the unzipped directory. Is it a separate download? Is using LUA with Cocos2d-x actually documented anywhere?

Sorry for all the questions but, after a day of searching, I’m no clearer on what to do next.

Thanks

Check out <cocos install directory>\samples\Lua\HelloLua\proj.ios\HelloLua.xcodeproj

Think you should be able to compile and run that with the iphone emulator on xcode without any problems, I tried that briefly on the previous version of cocos (now I’m just working on Windows). Or you can go straight to making your own project, and for that I’d recommend the method outlined here:

http://www.cocos2d-x.org/projects/cocos2d-x/wiki/How_to_create_a_multi-platform_project_in_one_command_line

Cheers Sami! I’ll take a look…

Is there proper documentation for using LUA with Cocos2d-x?

Not really… The helloLua and testLua examples are pretty good to get you started.

I’ve mostly browsed the .pkg files in tools/tolua++/ directory, that’s where all the classes/functions/macroes that are actually exported to lua can be found. Browsing the C++ api docs (http://www.cocos2d-x.org/reference/native-cpp/index.html) can be useful as well. I think someone made a script to make html docs out of the .pkg files, but I didn’t find it too useful for me, and just stuck with looking at the files themselves. So you could probably find that too by searching the forums if you’re interested :slight_smile: