Tuesday, December 2, 2008

Grunt lua framework released!

After months of works, my scripting framework is finally release!

Features of my scripting framework
1) c++ able to call lua global functions -- call("foo","%d","%d",1, %bar)
2) c++ able to set/get lua global variables -- setVar("foo"), getVar("foo")
3) c++ able to invoke lua's class's methods -- call(this, "foo")
4) c++ able to set/get lua's class's properties -- setVar(this, "foo"), getVar(this, "foo")
5) lua able to call c++ global functions -- foo()
6) lua able to set/get c++ global varables -- bar = 2;
7) lua able to invoke c++ class's methods -- app:GetName()
8) lua able to set/get c++ class's properties -- app.name
9) lua able to add new methods and properties to c++ class
10) lua able to overwrite c++ methods and variables
11) simple interface, simple enough to use had coding instead of additional compilation steps (tolua++)
12) no dependancies (oppose to luabind)
13) clean and small!
14) very simple to torque game engine's scripting system

TODO
1) clean up the code, make sure no residue data in lua stacks
2) right now both lightuserdata and fulluserdata are used inside lua table, lightuserdata for dereferencing in c++, fulluserdata is for garbage collection only
3) garbage collection not working fully, as local object out of scope din trigger the gb, right now only trigger when lua_close is call
4) lua co-routine is not in yet
5) right now using c++ std::map to map lightuserdata and type string

and yesterday (strictly speaking is today) my company is re-structuring plus foo-fighter is dead, what a day!

the next thing that i need to do is investigate lightfeather and blender game engine. last but not least get a google code account for grunt game engine!


No comments: