Pages: 1
  Print  
Author Topic: Better visual scripting  (Read 1621 times)
Offline (Unknown gender) darkhog
Posted on: May 22, 2014, 07:23:32 pm
Member
Joined: May 2014
Posts: 8

View Profile
This is more for LGM/RadialGM.

One of the sore points of GM is that visual scripting capability is seriously limited, compared to tools like those by Clickteam or Game Develop. I know about GML/EDL but what I'm saying is that users should have a choice whether they want to use visual or textual scripting. Without any proper VS solution, the choice is virtually non-existent.

What I'm proposing is to base visual scripting on node-like structure (if anyone of you had ever used Jeskola Buzz, Psycle or SunVox should roughly know what I mean). Separate "modules" (aside of few built-in ones) could be coded in EDL and would come in two varietes:

- Events - basically work like "if" instruction and execute any action nodes (see below) that are connected to it when conditions are met. Event modules can be negated to make the condition they are supposed to evaluate be opposite (like adding ! in front of boolean expression)
- Actions - what to do when it is executed by event block.

There will also be some special "event" blocks that will be in always present in every visual script. Such as:

FrameStart - fires at start of every frame
FrameEnd - fires at end of each frame
Continuous - fires as fast as it can (no synch to framerate).
RoomStart - fires when room starts
RoomEnd - fires when room ends.

Ok. So how it would be processed?

Let suppose we have this simple workflow ([EV] means event block, [AC] means action block)

Code: [Select]
[EV]FrameStart->[EV]Player presses space && Mario can jump-> [AC]Mario.jump ->[EV]Mario is in water (negated)->[AC]Mario.allowjump==false
Yes I know handling input in synch with framerate is bad idea. Shut up, this is an example.

What happens here is that at start of frame activation signal is send to event block that checks if Mario can jump and if player presses space.  If it is met, Mario jumps. Then, AFTER jump action is executed, signal goes to event block that checks if Mario is in water(where he can jump infinitely) and if Mario isn't in water (as condition is negated), allowJump property for Mario is set to false (this is property that is evaluated "under the hood" for Mario can Jump module) so he can't do multiple jumps.

Of course you can link event module to multiple action/event modules:

Code: [Select]
                   [AC]Play music
[EV]RoomStart  ->  [AC]Put player at start
                   [EV]Player collide with enemy -> [AC]Remove any colliding enemy at start so player won't get insta-death
In such case all connected blocks/modules will be executed at once (or so fast that it would seem like at once).
If we have such setup:
Code: [Select]
[EV]Some event   \
                   ->[AC]Some Action
[EV]Some event 2 /

"Some Action" will be executed if either of events will be true.

Of course modules will be able to be shared between users.

During compilation, visual code will be compiled into EDL.
Logged
Offline (Male) Goombert
Reply #1 Posted on: May 22, 2014, 08:19:09 pm

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 2993

View Profile
This is an interesting proposal, I've always been open to ideas of improving drag and drop to make the system more fluid and possibly integrated with scripting.
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Unknown gender) Darkstar2
Reply #2 Posted on: May 22, 2014, 09:47:33 pm
Member
Joined: Jan 2014
Posts: 1238

View Profile Email
So basically a rehaul of D&D.  Personally I encourage people to learn pure scripting and make their entire game based on GML/EDL,  I used to be fond of D&D but now I cannot stand to use a single D&D and only use GML, for everything.

But your proposal sounds like a good alternative for those who want VS.
Logged
Offline (Unknown gender) darkhog
Reply #3 Posted on: May 23, 2014, 03:25:24 am
Member
Joined: May 2014
Posts: 8

View Profile
You can't stand VS in GM, because it is inferior in comparison to other tools like Clickteam's products, Construct, Game Develop. Hell, even Stencyl. In those tools VS is realized much better than in any version of GM.

GM visual scripting is just shitty, that's just fact.

As for my proposal, I spent ,last week or so trying to implement it myself, but I failed miserably. Hence posting here.
Logged
Offline (Unknown gender) Darkstar2
Reply #4 Posted on: May 23, 2014, 12:10:10 pm
Member
Joined: Jan 2014
Posts: 1238

View Profile Email
You can't stand VS in GM, because it is inferior in comparison to other tools like Clickteam's products, Construct, Game Develop. Hell, even Stencyl. In those tools VS is realized much better than in any version of GM.

GM visual scripting is just shitty, that's just fact.

As for my proposal, I spent ,last week or so trying to implement it myself, but I failed miserably. Hence posting here.

In a way that is good because that is what pushed me to do GML, now I can't be bothered with visual anymore and do everything by code.

BTW there is a skilled developer on the GMC over they ears who built all of his projects from simple to very complex entirely in D&D, he was even talked about by the YYG devs and featured. 
Logged
Pages: 1
  Print