lua-users home
lua-l archive

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


I have a small little C++ wrapper that uses templates to do 99% of the work for you located at http://www.rm-f.net/~gambit/lua/ It's just a technical exercise, if you're interested I could upload the full versions which includes GC work and support for multiple simultaneous interpreters. This is what I'm using for my "game" project. Though I haven't done any speed analysis, etc., of the mechanism, and it might be terribly slow, it should at least give you an idea as to one possible route to take.

Best of all, it doesn't require any crazy parsing of your code, using instead some crazy template logic to do all that for you :D
-G

At 01:17 PM 3/31/2002 +1000, you wrote:
I'm sure this has been asked and answered many times, but I could not locate a clear answer in the message archives.

Can I use lua as an ebedded scripting language in my c++ code, such that my lua scripts have access to my c++ objects, and can call member functions, etc?

I want to control the game objects, created in the main c++ code, through the script, but don't know if pointers to objects can be accessed within lua.