Jump to content
  • Advertisement
Sign in to follow this  
Tangletail

How to go about a simplified visual scripting

This topic is 685 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does anyone know a good way to do some simple visual scripting? I've had a small, possibly no unique, idea to use a visual scripting feature where players combine predefined modules of code together.

I know how to easily handle the possibilities of syntax errors where certain modules are expecting a specific type of input.

But I don't know a good way to logically spaghetti modules together. The scripting modules used in game will be built inside of Lua. And will be things like...

[GetAllVisibleEnemies]
Inputs: No inputs
Ouputs: an Array of enemies within line of sight

 

[Filter]

Limits information to specific data

 

[SpawnField]

inputs: a field based entity: Fire, Giant lasers from the sky, spikes, grease, webs; and location

Outputs none

Edited by Tangletail

Share this post


Link to post
Share on other sites
Advertisement

If Labview has it's source open, I don't see it. And I'll take a look at scratch.

But I kinda wanted a concept more than a solution. One size doesn't always fit all.

Share this post


Link to post
Share on other sites

Labview is a commercial program, but it has a graphical programming language called (I ithink) G-language.

 

I don't think either of them fits exactly to what you want (although that is hard to guestimate), but at least they may be an inspiration.

Share this post


Link to post
Share on other sites

Do you have familiarity with the shunting yard algorithm? https://en.wikipedia.org/wiki/Shunting-yard_algorithm

 

Your visual scripting is going to boil down to a GUI for building expressions, so the first thing you should know is how you will process those expressions, that way you know exactly how you have to build them. 

 

The Standard Expression calculator is a strait forward example without the need for a lot of other support so it is most often used in examples, but it can be implemented to be applied to non numeric expressions and to handle functions and such.

 

 

Since, the shunting yard algorithm is simply used to convert from infix notation to RPN, you might be better off using the GUI to build RPN expressions in the first place. I suggested the shunting algortihm because RPN tends to be a bit more difficult to write free hand, but since it is a GUI interface anyway, it is possible building an RPN expression might be easier. Either way, I would start with the shunting yard b/c it'll be easier to see what your gui has to do if you are able to write the expected results out by hand. 

Share this post


Link to post
Share on other sites
If you have the means labView would probably be the best example of a graphical (how ever a license for it is a bit expensive) programming language but there is also scratch. I would even look at node editors in blender and similar applications because that is more or less graphical shader programming

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!