views:

107

answers:

1

Has anybody tried converting Luabind to C#? Is such a thing even possible?

I've got an application that I want to convert so that it can run in a completely managed environment, but most of the game logic relies upon Lua scripts, and the application uses Luabind to manage the back-and-forth. I'm not familiar enough with Lua or Luabind to know what's involved.

Am I on a fool's errand here?

+1  A: 

It's theoretically possible to keep running Lua from C# (not to convert Lua to C#). However, if Luabind is used between C++ and Lua, that will complicate things a bit, as luabind adds a lot of stuff to Lua and I'm not sure this could be simulated or ignored. It really depends a lot on what parts of Luabind are relied upon. Have a look at LuaInterface, it's a good mediator between .NET and Lua.

All in all, I'd say this task is probably doable, but very tedious and error prone, large parts of the Lua code will most certainly have to be updated as well. I'd stay on the native side, .NET is overrated anyway ;)

sbk
Note that LuaInterface has an x86 build but no x64 build. So your game will become x86 only if you use that.
Frank Schwieterman
Unfortunately, the platform I'm working towards is Windows Phone 7, which doesn't allow ANY un-managed code (I've tried linking the LuaInterface .dll's, to no avail). I found another Lua engine that's written entirely in C#, but it seems to have disappeared from the web since I downloaded it.I'm beginning to think I may be barking up the wrong tree with this game...
themarshal
@themarshal: tough. Full rewrite might be the only option then. Good luck :)
sbk