I'm kinda new to scripting and combining languages with each other so i have a question about something that confuses me about it.
If you want to script a game engine, do you embed the script in the engine or the engine in the script ?
In the first scenario, if you embedded the script in the engine, I can't really wrap my head around how that would work. Would you have this big script function you called every time you went through the game loop, passing along the inputs etc ? Like I said I have a hard time wrapping my head around it.
In the second scenario, if you embedded the engine in the script, I could see how it would be convenient to just treat the whole engine just like a object in the script, and call a simple function each time you wanted to create a new mesh or something. On the other hand how would the game loop inside the engine work ? Having a extra thread for that seems like it could complicate things.
I hope that made sense, otherwise let me know. You are welcome to explain further about how scripting a game engine works, if there are any general patterns you use, or link me to some good guide about it ( because i haven't really found any good one that deals with scripting game engines). But i would appreciate if you explained which of the 2 scenarios you use.
Ps. My engine I'm working on is written in c++ and I am planning to script in python 2.7 ds.