Woo-hoo! Replaced the Lua scripting system in Battle World with AngelScript, making everything like 200x easier (AngelScript is in C++, Lua is in C, so AngelScript makes hooking everything up pretty easy).
To tie it all up, I've made a scripting class that starts up an AngelScript engine, registers your functions and calls Angel Script functions. It also loads byte code and compiles source code, very snazzy.
My call angel script method has the following two features that make it awesome:
- Variable arguments - So the call syntax is scriptEngine->CallScriptFunction( "void FunctionName( int, int, int, int )", all, my, arguments, here );
- Returns a pointer to the result - So I can do int two = *( int * )scriptEngine->CallScriptFunction( "int GetTwo()" );
The big downside is that it uses the standard library string as it's string type, angelscript considers character pointers too dangerous (Don't blame it) so doesn't use them. Oh well.
So now I've finished a scripting class, a multi-threading class, and a UDP packet sending/receiving class.
I am now working on a todo list for engine components. Good planning always helps.