lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi,

A year ago I had a hard time finding a Lua C API tutorial that showed a good way to export C++ classes. I refused to use a heavy binding library and learned how to do it myself, with the Lua reference manual and a lot of trial and error.

I've written a Lua C API tutorial aimed at indie game developers. The main goal is to show you how you can export C++ classes for use in a Lua script. It's pragmatic. The tutorial is unedited and sure to contain a bug or two, I haven't even run the example code (I know, so irresponsible), but am just simplifying real code from my own game engine. If someone is bored, perhaps they can take a quick gander at the tutorial to make sure I am not making some gross error and perverting innocent young'uns minds with bad practices.

http://forums.tigsource.com/index.php?topic=22524.0

For the record, the techniques I am using are working great in my iOS game and I have good performance, stable memory usage, and no crashes (so far), so I don't think I'm totally off base, but I've only been using Lua on this one project for about a year, so maybe I'm missing something.

Thanks.