Sign in to follow this  

Scripting and tasks...

Recommended Posts

While thinking about the Enginuity kernel and a scripting engine, I came across an interesting problem. Scripting engines should be multitasking, and my understanding is that something like this: Script s1 = loadScript( "1.script" ); runScript( s1 ); Should wait until the script finishes executing before returning. The script should also be able to load scripts, which makes for the multitasking part. However, the problem I am contemplating is that, normally, you would do the above, but with a kernel-based (task-based) system, you would have to create a task for the scripting engine, and run the script in pieces. That brings problems, like how big should the pieces be? I still want the same functionality of both systems (i.e. linear programming w/the script, automatic video/audio/input update from the tasks), but a major problem is, the script will slow down as each frame gets more complex. The framerate won't be affected, because the pieces are all the same, but the script will start doing actions slower, etc. get what I mean? So what would be an effective implementation of this? It should be possible, judging from some engines I have used that have this kind of functionality. Does anyone have any idea about how?

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this