stride3d / stride

Stride (formerly Xenko), a free and open-source cross-platform C# game engine.
https://stride3d.net
MIT License
6.52k stars 944 forks source link

Visual Scripting Epic #19

Open xen2 opened 6 years ago

ahrenm commented 6 years ago

Could I throw an idea on the table. Rather than jumping straight to visual scripting, with all it's intended complexity, what do people think about implementing C#/Roslyn scripting for GameStudio automation and control. This could provide an entry point for other epics around breaking up the GameStudio modules and providing extensibility support for the editor.

Once that is under control it could be a logical pre-cursor to implementing C# "scripting" as Xenko engine feature is it's own right, which Visual Scripting might more easily sit on top?

xen2 commented 6 years ago

I will add more details later, but we already have a prototype of visual scripting in the code.

It relies heavily on Roslyn and have lot of automatic code analysis (i.e. people can put "custom" blocks with code expression such as a + b and it will automatically generate a box with a and b as input).

There's still quite some work to do though.

But I agree with you, might make sense to adjust and do it differently/more limited scope depending on new objectives/targets.

tebjan commented 6 years ago

@xen2 It would be very interesting to see what your prototype looks like and what ideas and concepts it follows.

Since we develop a visual programming language this Epic is particularly interesting to us. We have a proof of concept of integrating our visual programming language VL into a xenko game project. We made a first announcement in our blog with a short teaser video and have a discussion in our forums.

VL is a statically typed visual programming language for .NET with runtime compilation and state hot swap. It can define data types, reference nugets, has control flow, generics, delegates etc. and is integrated in our creative coding toolkit vvvv.

For reference here are some example videos of projects that vvvv users are doing.

Our current plan is to investigate further into possible workflows that combine xenko and VL. Next week we will have a summer camp where we will brainstorm with more users and try to come up with the first todo's. After that we will implement some of the ideas and apply them to real world problems.

I'll add more info here as soon as we have the first results.

xen2 commented 6 years ago

@tebjan Sure, I will get in touch with you once I start to investigate for this epic again! Quite interested in the work you are doing.

tebjan commented 5 years ago

Here is some progress report: https://forums.xenko.com/t/visual-scripting-visual-programming-in-xenko/1524

Dunathan commented 1 year ago

I'd like to leave some research material and contribute with my opinion.

I have experience with many Visual Scripting tools such as Cryengine Flowgraphs, Unreal Kismet, and Blueprints, most of Unity's tools, Scratch, and even some related to engineering and industrial automation.

The toolset that made the most sense, performed well, and had good integration, in my opinion, was Bolt 2. Unfortunately, Unity acquired and discontinued it, choosing to continue with Bolt 1 because it was already delivered. However, Bolt 1's technology was really outdated and lacking after all this time, and now Bolt 1 is no longer in development, leaving Unity in a tricky situation regarding Visual Scripting. This may be an opportunity for other engines.

Bolt 2 had a beautiful design and was very easy to read due to the colors and contrasts chosen. The code generation offered a useful way to learn and teach written code, in addition to offering the best performance, it had full API access giving the same freedom as written code. For people who love Visual Scripting, it was a real and complete IDE.

Here we still have the design document: https://www.notion.so/Bolt-2-6a85ef4102694be889fb8413ab83aaa7

And here, PanthenEye made a useful defense of Bolt 2: https://forum.unity.com/threads/on-the-road-to-the-next-major-version-of-unity-visual-scripting-lessons-from-bolt-2.1285637/

Furthermore, it was an extension of Unity, which made development and maintenance easier. It carried a defined set of namespaces and types, but the user could add any others. Lastly, there was a set of custom high-level nodes, but if you look at the documentation, "which mostly covered those high-level nodes and general functionalities," it was quite minimal. The rest of the nodes were generated automatically upon the first installation or on-demand.

I believe this design deserves consideration. I'd love to hear your perspective.

https://ludiq.io/blog/bolt-2 Bolt 2 Mockup: image