I'm doing an agent based framework with C++ and Lua. I want to use Lua to code the Agent behaviour having an
AgentClass class that have the name and source code and an
AgentInstance class that have the lua_State. I want to have a few
AgentClass instances during execution but hundreds or thousands of
Is there any way to share the same lua script with different
lua_State? Or Is there a better way to get hundreds of agents without too much performance penalty?
- Having compiled Lua code in
AgentClass, setting a self variable in every