I believe that the current scripting workflow has some flaws:
- 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.
- It’s very hard to re-use behavior for scripts, unless you’re going to create lots of functions and controller classes.
- Scripts make it very hard to do anything ‘modular’ for a game. In an engine like Godot, I can just make an
Interactablescript which has aninteract(player: Player)function, in Wick I can either re-use themouseclickscript, or make every single interactable object have some declaration in its code.
My suggestion for fixing this issue is to:
- 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.
- Scripts will always run in a ‘global’ scope. Instead of
thisbeing the clip or project running the script, you will reference them byclipandproject. - 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.