With Lua I reformatted the class to have more of a "homely" feel:
#include #include "scriptlua.h"int main(){ ScriptLua lua; lua.LoadFile("somefile.lua"); lua["SomeVariable"] = 20; lua.CallFunction("SomeFunction", "arg1", lua["SomeVariable"].ToInteger()); std::cout << "SomeVariable is: " << lua["SomeVariable"].ToString(); return 0;}
But what does all this scripting stuff have to do with the engine or anything else that I'm working on? I have no clue and thanks to this journal entry or I'd be lost forever. I shall get back on track. Asteroids and then a quick and dirty tile engine to create a snake clone (where the snake eats you!... Or something like that, I don't have all the gameplay details yet).