Sign in to follow this  

using scripts for callbacks

Recommended Posts

hi, I'm planning on implementing a virtual machine into my engine and was wondering what the best way to use this would be, say for instance I had a mission script that was to control all the gameplay of a certain mission/level, would it be better to give total control to the script i.e let the script run its own loop and check/handle different variables, call interfaced functions of the engine, or would it be better to implement callback functions in the script so that for e.g. when the player enters a different room the virtual machine will call a certain function in the script? I can see the pros and cons of both but how would a script such as a mission, A.I etc. normally be executed in games today?

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