Good Example of using Lua and C++ practically in a game

Started by
1 comment, last by Serapth 11 years ago

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,

Ben

Advertisement

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.

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.

This topic is closed to new replies.

Advertisement