Please help to classify ways of organizing C++/Lua game code and to separate their duties. What are the most convenient ways, which one do you use?
For example, Lua can be used for initializing C++ objects only or at every game loop iteration. It can be used for game logic only or for graphics, too. Some game engines provide full contro...
Call main.lua script at each game loop iteration - is it good or bad design? How does it affect on the performance (relatively)?
Maintain game state from a. C++ host-program or b. from Lua scripts or c. from both and synchronise them?
(Previous question on the topic: http://stackoverflow.com/questions/2674462/lua-and-c-separation-of-d...
How to register a C function in Lua, but not in a global context, but as a table field?
...
Hi guys,
I need a very simple c++ function that calls a lua function that returns an array of strings, and stores them as a c++ vector. The function can look something like this:
std::vector<string> call_lua_func(string lua_source_code);
(where lua source code contains a lua function that returns an array of strings).
Any ideas?
Th...