Scripting Revamp

I believe that the current scripting workflow has some flaws:

  1. Scripts shouldn’t require a clip or frame to run. This causes the issue of having to order scripts and create unnecessary amounts of layers for using more manageable scripts.
  2. It’s very hard to re-use behavior for scripts, unless you’re going to create lots of functions and controller classes.
  3. Scripts make it very hard to do anything ‘modular’ for a game. In an engine like Godot, I can just make an Interactable script which has an interact(player: Player) function, in Wick I can either re-use the mouseclick script, or make every single interactable object have some declaration in its code.

My suggestion for fixing this issue is to:

  1. Scripts will become their own item. Instead of creating scripts inside a frame or clip, you create a script which is assigned to that event.
  2. Scripts will always run in a ‘global’ scope. Instead of this being the clip or project running the script, you will reference them by clip and project.
  3. The scripts will have settings, with them being:
    • Autorun: Checkmark; When set to true, will be ran before anything in the project happens.
    • Expose: Checkmark; When set to true, the script can be called by it’s name as any other function.
    • Classic: Checkmark; When set to true, the script will run like the ‘classic’ script system.