Jump to content

LE Flowgraph


Rick
 Share

Recommended Posts

gallery_112_32_37833.png

 

This is my early prototype of visually programming the Leadwerks Engine. Every LE function is fully mapped out dynamically thanks to the LE.NET DLL and the use of reflection. I modified LE.NET some to include method attributes that puts each method in a category based on the where they are in the wiki, then dynamically build the menu structure you see from those attributes. The program is in .NET 4.0 (if that wasn't obvious), but the resulting code that it'll generate could (in theory) be any of the supported LE languages.

 

**The result triangle is wrong in that picture. It should be pointing down as to show the result is being pushed out from the method node and you can store it in a variable.

 

Next on the blocks:

 

- Make connectors functional

- Make variable creation

- Make some basic programming structure nodes (conditional/loop)

- Make the code behind of the nodes

 

 

Currently the canvas you see would be all inside the main function. After I get the above complete comes the truly interesting part of visually creating classes and your own methods. It's basically visual OOP with the LE library. I don't plan on implementing the .NET library this way as the code behind should be somewhat generic to most programming languages.

Link to comment
Share on other sites

The flowgraphs will be insanely huge if you use single commands for everything, unless you can make functions and classes with flowgraphs too. I think you should make something like GameLib.NET which has modular functions like MouseLook(), PlayerShoot(), DynamicFOV(), EnemyMove(), etc....

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

The flowgraphs will be insanely huge if you use single commands for everything, unless you can make functions and classes with flowgraphs too. I think you should make something like GameLib.NET which has modular functions like MouseLook(), PlayerShoot(), DynamicFOV(), EnemyMove(), etc....

 

This is the building blocks for that. The canvas you see would basically be a function (in this case it's int main()). When you can create classes and class methods the canvas you'll see will be for that function. I'll probably add a treeview to show the class hierarchy somewhere, but the idea is that everything will have these basic building blocks.

 

Once the basics are working then allowing templates and such can help people easily bring other peoples flowgraphs into their own. That's the idea anyway. Baby steps for now.

 

That reminds me I need to add zoom ability so you can see more/less of the canvas.

Link to comment
Share on other sites

3D view would be also cool so you can have also side connectors which do some parallel processing or something, maybe multi-threading. And with 3D view you can rotate around the Y axis so more relevant things are shown closer to the camera, which gives more room on the screen without needing to zoom everything out.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

3D view would be also cool so you can have also side connectors which do some parallel processing or something, maybe multi-threading. And with 3D view you can rotate around the Y axis so more relevant things are shown closer to the camera, which gives more room on the screen without needing to zoom everything out.

 

I'll stick with 2D for now. ;)

Link to comment
Share on other sites

gallery_112_32_5701.png

 

Connector lines for in/out created. The bottom grid view will be to set method parameters if you wish them to be hardcoded values. Can also create basic programming variables.

 

Next

====

Connect connectors to variables. Just have to get this visually down.

 

Make a Start and Finish node. Start node will be what's looked for when generating code so it knows where to follow the in/out flow of the method. Finish node will be the "return" of the method. Finish will have 1 parameter which is the return type. If the method returns void you won't need finish but can still use it to break out early. Start node will only have and out, and finish will only have an in and 1 parameter.

 

Parameters to the method. These will show up as menu items. It'll say something like Parameter Variables and allow you to add the same one as many times as you like, but instead of the code generation making a new variable when this is selected it'll use the parameter variable that is passed into the method.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...