Virtual Machine 

BlitzScript3D Engine's Virtual Machine loads and executes scripts. Scripts are loaded with BlitzScript3D commands:

BlitzScriptLoad(filename$)
BlitzScriptExec(filename$)
Note: Filename extensions are omitted when using these commands.

When scripts are loaded, the VM will check for the pcode (*.bso) version of the script first. If the *.bso is found, it loads it, otherwise it will search for *.bs or *.bsc version of the file to compile it. The *.bs version of the file is converted to *.bsc by the Preprocessor for compilation. The Compiler compiles the *.bsc into *.bso. If no *.bs or *bsc version of the file is found the compiler will error with no file found. This loading behavior is useful for increased loading speed and allows you to remove *.bs and *.bsc after compilation if you do not desire the scripts to be visible.

The VM is updated within the main application loop with the engines bscvmThreadUpdate() Function. Each script is processed one at a time. The behavior of script updates can be controlled in a variety of ways.