Omnomasaur

I'm in your city, eatin' your buildings.

Archive for the ‘Programming’ Category

C++ and Lua

No Comments »

April 25th, 2012 Posted 2:14 am

 

Last Friday (April 25, 2012) I was given the impromptu task of programming something “cool” in 1 hour.

I decided that I would attempt to implement Lua scripting with C++.

One hour (and countless linker errors) later I had managed to get a program to run scripts from a .lua file, Hello World for this project.

Even knowing that Lua was created to be a scripting language embedded within other programs, I was still surprised at just how easy this was to do, and while due to the time restriction I was unable to implement some of the more advanced features (such as exposing c++ variables, classes, and methods for use in Lua scripts) it was still a good project.

In the future I plan to experiment with the more advanced features I couldn’t get to, as well as implement Lua scripting capabilities into future games I create.

Source Code:

http://www.omnomasaur.com/content/upload/lua-test.zip

Posted in Programming