Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

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

4: Adsense

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   

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



#2 Azaral   Members   

467
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   Members   

6670
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.