The engine is basically split in a few main parts, which communicate with each other. The user only has partial access thru scripting, and does not have to worry about what is done internally. However here is a short description about the key elements in the engine
Once a lua script was loaded, the execution of the engine is continued. However, every frame a lua function is called. You can register functions to be called every frame by using the Timer class.
Many of the lua calls will end up here, in the engine's own system to work on user variables and class methods. The system publishes all classes that can be accessed from Lua along with the methods that are allowed. See LuaDoc? for details.
The user can load models, textures... The resource manager can be split into various memory chunks, if the user wants to, but normally there is one big MemoryPool? where all user resources go to, and will reside until the end. One cannot unload resources individually, only complete chunks, if chunk management is used. Resources can only be loaded once, and will be referenced to, if loaded again. They are first looked after in the projectpath, then if not found in the basepath.
The Renderer performs 3 main tasks, and comes before anything else.
Setting up the proper environment (background,lights, cameras,...)