Can someone give me an example of how I would use lua in a game engine? If you can post some code up here that would be great too!
Thanks for this little bit of help,
Jump to content
Posted 21 April 2013 - 07:33 AM
Look at the game Natural Selection 2. The core of the engine is written in C++, but all the game 'content' stuff is written in Lua. All the code for the marines and the aliens and weapons and structures is Lua files.
It also has 100% dynamic lighting, which is cool.
Edited by Azaral, 21 April 2013 - 07:34 AM.
Posted 21 April 2013 - 09:06 AM
Go check out Moai's source code on C++. Moai is a cross platform game engine scripted in Lua but written in C++. It's open source and some of the easiest to grok non-trivial C++ code I have ever read.
My more Popular Tutorial Series: