Original Post
Basically I've been looking into integrating multiple scripts into a game engine. I've used my own basic command scripts in the past, and divided up execution time between scripts by doing one line at a time. Recently I've looked into the flexibility of using more advanced scripting languages such as Lua. Unfortunately, Lua seems to require the scripts to actually make a yield command, which doesn't seem ideal. What I'm looking for is a method of requesting a script to either execute one line at a time on demand, or execute for a limited amount of time, or automatically divide CPU time between multiple scripts in-between frames. I'm not really bothered about which language I use, but whichever method would be most suitable, and not too much hassle to implement. Any ideas? Thanks.