loopier / animatron

Animatron for Godot 4.x <
15 stars 1 forks source link

Thoughts on non-pure OSC syntax (expressions, variables, `for` loops, ...) #38

Open loopier opened 2 months ago

loopier commented 2 months ago

Do we really need expressions, variables, for loops and stuff like that?

Wouldn't it be easier to use GDScript functions directly? Maybe with a wrapper for the OSC message itself.

The biggest advantage would be that we don't need to implement a parsing system with all the work it implies of implementing and maintaing it.

I'm suggesting this because it feels a bit overkill to design a parser for an expression sub-syntax when we will only be using this from the embeded editor, from were we can use regural GDScript.

It might not be as elegant as embedded syntax, but that is not that elegant after all, because it's 2 syntaxes in one.

What do you think? Would you rather have the expression implementation we've been working on, or discard it and try using GDScript instead?

Sorry if you suggested this in the past and I argued against it. I cannot recall it.

totalgee commented 1 month ago

I may or may not have suggested it in the past, but regardless I think it is a good idea. (-; However, our current "expression syntax" (stuff in {}) is already handled by GD, we're not doing our own parsing, except for $ variables. It's not exactly full GDScript either, more of a subset. It would be a separate thing to support general GDScript code, which would allow defining functions, doing loops, logic, etc. We'd have to talk about how to do this in a good way.

loopier commented 1 month ago

I may or may not have suggested it in the past, but regardless I think it is a good idea. (-;

What is, using GDScript or our expression sub-syntax?

totalgee commented 1 month ago

Using GDScript.