Original Post
I''ve added Lua scripting to my game engine, but I''m not sure how to completely interface the two together. I want to make it where the scripts basically control all the game logic. That''d mean there''d be a LOT of functions my game engine would need to export for the scripts to use. They''ll also have lots of different uses, like a lot will be used to init and shutdown the engine itself, some used for AI, some used for physics, some for loading and unloading resources, etc.
How do I manage all those functions? Do I put them in one giant .cpp file? Or do I seperate each general area into it''s own .cpp file, like the loading and unloading functions go in script_engine.cpp and AI functions go into script_ai.cpp? And what about different types of entities needing different AI functions? Like giant death stomper robots need their own functions and alien chickens will need their own; how to I manage these?