Jump to content

  • Log In with Google      Sign In   
  • Create Account


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


Old topic!
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.

  • You cannot reply to this topic
2 replies to this topic

#1 thecodethinker   Members   -  Reputation: 101

Like
0Likes
Like

Posted 20 April 2013 - 10:12 PM

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



Sponsor:

#2 Azaral   Members   -  Reputation: 463

Like
1Likes
Like

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.


#3 Serapth   Crossbones+   -  Reputation: 5265

Like
1Likes
Like

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.






Old topic!
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.



PARTNERS