Lua scripting

Started by
0 comments, last by Monder 20 years ago
I''m planning on using LUA for scripting in my 2D game engine (which is written in c). However now I get down to implementing it I''m not entirely sure how I should go about executing functions in different script files. My current idea is I have a global lua state and when something wants to call a function in a script it loads the script using lua_load and then calls the function. However this seems like a rather bad way to do things, can anyone suggest anything else?
Advertisement
Well I''ve now worked it out. I''m gonna have to have a lua_State for every script file I load.

This topic is closed to new replies.

Advertisement