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
Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.
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.
GameDev.net™, the GameDev.net logo, and GDNet™ are trademarks of GameDev.net, LLC.