In an earlier post, I have written that I have implemented Lua script support in the engine. Now it reached its full power since I have added a proper callback mechanism to it. It makes possible for the triggers in the engine to call user specified Lua functions on firing. Unfortunately, SWIG does not help to implement such callbacks, so I had to do it by myself.
While I was doing the porting, I have found SWIG, a very useful tool for Lua integration. Actually it supports so many other languages and interfaces, but I was interested only in game scripting so far.
Why scripting? Scripting is an important feature of a typical game engine, and Merlin3D is not an exception. Prototyping, game and GUI coding is much more easy if I do not have to recompile the whole game engine or DLL. With SWIG adding scripting to the engine is quite easy, so it seemed to worth a try.
Read the rest of this entry