Page 1 of 1
Lua
Posted: Tue Dec 22, 2009 2:02 am
by dejai
I remember gyro talking about wrapping items for lua in one of his videos. I am looking to do something similar and use lua to handle game logic so if I call spawnObject(x) or whatever, it will run the C++ function that specifies that. Any ideas where I can get more information on this? Thanks.
Re: Lua
Posted: Tue Dec 22, 2009 2:33 am
by K-Bal
Are you using a wrapper lib? If not, I would recommend the Lua book:
http://www.amazon.com/Programming-Lua-S ... 676&sr=8-1. With Luabind it's very easy.
Make the Lua part as small as possible. Try to keep the core functionality of your logic in C++.
Ciao,
Marius
Re: Lua
Posted: Tue Dec 22, 2009 1:28 pm
by dandymcgee
K-Bal wrote:Are you using a wrapper lib? If not, I would recommend the Lua book:
http://www.amazon.com/Programming-Lua-S ... 676&sr=8-1. With Luabind it's very easy.
Make the Lua part as small as possible. Try to keep the core functionality of your logic in C++.
Ciao,
Marius
One time, I put my game loop in a Lua script...