1. Help Center
  2. Getting Started
  3. Advanced Series: Broader Concepts

Frame Processing

This article describes the order in which the system processes frames.

A script can have many frames. The order and relationship between the frames impact when they will be processed by the system. Frame processing happens at the speed of a computer, not that a human. It is quite fast. Two frames on the same level with no conditions appear to happen at the same time to a user.

The flexibility of this system makes several types of branching possible within Storyflow.


Processed Frame

A frame is considered processed once the system has evaluated its conditions. If its conditions are false, the frame is queued until:

  • The frame or any parent of it on the same branch becomes deactivated.
  • The script which contains the frame is ended.
  • The conditions on the frame become true. In this case, the frame will open.

Open Frame

An open frame is a processed frame whose conditions are true. An open frame activates its resources and its child frames will be processed.

Child Frames

The main function of child frames is to control the order in which frames are processed. Frames are arranged in a tree structure. A child frame will only be processed when:

  • Its parent frame is open, meaning its parent has been processed and the conditions on the parent are true.
The order of a frame in a given branch determines when it will be processed. For example, if frame has three siblings and is listed second under their common parent, it will be processed second once the parent frame is open.

Frame Conditions

Frame conditions gate resources. Frame resources will activate and any child frames will begin to be processed once the frame conditions are true. Frame conditions will only be evaluated by the system if the frame has been processed.

Processing Flow

When a script is launched, the system script processor will begin processing the frames in the tree starting from the root frame. Each script has a single root frame called Main Frame. That frame has a tree of 0-n child frames below it. The script processor processes each frame as follows:

  1. Evaluate the conditions. If the conditions evaluate to true or no conditions are present, it is considered to be met
  2. If the conditions are met
    1. Activate frame resources
    2. Process any child frames
  3. If the conditions are not met
    1. Queue until the conditions are met and move to the next frame on the same level

The flowchart below describes the process.


As an example, the script below shows the order in which the frames will be processed. This assumes that all frame conditions are true.