lua-users home
lua-l archive

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


On Wed, Dec 15, 2010 at 12:16 PM, Tim Mensch <tim-lua-l@bitgems.com> wrote:
> Hey all,
>
> I'm starting to realize why there are always a stream of "don't use
> automatic bindings" messages every time someone asks what automatic
> bindings are decent. There seem to be serious downsides to all of them. :(
>
> I finally dug into several that seemed appropriate for the project I'm
> working on, and found serious problems with each one. If anyone is
> interested in my findings, I posted them in a blog entry [1].
>
> I also linked to that entry from [2], so that my analysis might be
> useful to someone in the future who's trying to make a similar decision.
>
> I think the right answer for a light, general purpose Lua binding would
> be close to tolua++ in design, but with a cleaner parser and support for
> a few things that tolua++ is missing (like smart pointers, which I
> mentioned in another message). Oh, and any kind of support would be nice
> as well -- I barely got a response when asking about tolua++ here, and
> the contact email on the tolua++ page bounces :(.
>
> Tim
>
> [1] http://realmensch.org/blog/fun-lua-bindings
> [2] http://lua-users.org/wiki/BindingCodeToLua
>
>

Greetings,

I currently am searching for the solution on this topic too, since My
friends and I had a game project written in relatively complex C++
usages (heavy template uses, boost and tr1 libraries, and most
importantly, a object pool which totally based on boost::object_pool
and shared_ptr.)
and now we're trying to figure out how to make bidirectional
communication between our C++ codebase with lua scripts.

I skipped luabind and lqt's generator part for being too heavy, and
still trying to figure out what's with oolua, luabridge, SLB and
mluabind (I know luabridge has been dormant for some time, however it
says it was designed with smart pointers in mind and the interface
looked simple..);
but just as what you said in your post, all of them come with its own
pros and cons.

Oh, and I've been following GameKit/OgreKit too, they use SWIG for the
one way communication wrap, and GameKit don't use smart pointers (just
in-house reference counting) so it seems that SWIG is working pretty
well in that environment. But to switch to GameKit environment, a
large portion of our codebase must be written, and probably without a
working bidirectional communication.

I must say I'm pretty stucked too. Or if one is going to add scripting
ability, maybe he needs to consider everything from the very
beginning... like don't use smart pointers at all or something.

I figured our project is in a position which is pretty the same with
yours. Full smart pointer integration is a must, not just the
reference counting part. I've followed your post on oolua list and
your blog post in the last few days, ... so do you yet to figure out a
way which can make smart pointers effectively working in bidirectional
lua bindings? Roll our own? Use different binding methods for
different needs at the same time? (Is it possible to support full
smart pointer semantics if I do it myself? I didn't give it much
thought, but now all roads lead to this way, I just have to make sure
that whether anyone has already done it and found out it's just not
viable.)

Thanks in advance...