Post news Report RSS LuaInterface vs Tao.Lua

I ran some tests looking at how much faster using pure Lua bindings would be in .Net than using LuaInterface.

Posted by on

Last time I mentioned that I was going to try out the Tao.Lua bindings and see how much faster they perform than LuaInterface.


LuaInterface is really simple to use, and provides a full interface between your code and Lua without any need for wrappers. The downside is that invoking .Net methods is really slow. For every 10 of those flowers you can see in my last video, the framerate drops by 100!

My other option is to use pure Lua bindings, such as provided by the TaoFramework. I will have to write up wrappers for all the objects I wish to expose, but it will mean you will need hundreds of flowers before you notice a frame drop!Managed

LuaPlus may help with the wrapping, but I am definitely moving to pure Lua bindings. I have started working on the changes already!

Post comment Comments
NullSoldier
NullSoldier - - 973 comments

Very interesting, I look forward to seeing how LUA interacts with your game. I'd also like to see how exactly you use LUA and implement it. Though, I guess there are thousands of articles on that already online.

Reply Good karma Bad karma+1 vote
Boxycraft Author
Boxycraft - - 18 comments

To get an idea of how my new Lua files look, have a look at this tutorial from the Crysis Wiki: Wiki.crymod.com

My files look similar but so far with only Initialize, Draw, Update and Expire functions. They also can't yet have their properties changed in the editor.

The articles you'll find online are mostly for c/c++, but using Lua in managed code is pretty much the same, except you can't use memory pointers and userdata.

LuaInterface is different though, but I wouldn't recommend using it in a game where you are going to be making calls to it every loop.

Reply Good karma+1 vote
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: