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
I propose this classification:
Extreme variant: Lua scripts control everything (game logic, graphics, AI etc.). Even more: script works as a host-program, owns game loop. Some engines do such thing. Ba-ad thing: no separation of duties at all and no script safety.
Lua scripts maintain game state and process game logic. Probably scripts are called at each game loop iteration.
Lua scripts are rarely used for initializations, configurations, callbacks. A host program provides (binds) a very minimalistic interface for the scripts. So scripts are built from such well-designed and provided blocks.