Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon


7. August 2016

 

I’ve been a huge fan of the open source Godot Engine for a very long time, in fact I’ve done an in-depth tutorial series available here.  Godot has seen a number of improvements in the upcoming 2.1 release, but the recently added Visual Scripting interface is probably the biggest new addition.  In this post we are going to look at this new functionality.  A couple of warnings to start.  First, as of writing ( 8/7/2016 ), Visual Scripting is only available in the development branch.  So you will have to build Godot engine from scratch from the Github repository.  Second, this functionality is extremely early and not fully developed.  There is currently no debugger or profiler support and expect bugs.  Heck, I’m having trouble even running scripts at this point, but it’s probably user error on my end.  You have been warned!

 

I also did a video showing hands on with the new Godot Visual Scripting language.  It is available embedded below.

 

Creating a Visual Script

 

Creating a script is a simple process, basically identical to creating a GDScript.  Add a new script as usual.

image

 

Now in the Create Node Script, pull down language and select VisualScript.  VisualScript’s have a .vs extension in Godot.

image

 

Creating Visual Scripts

 

Visual Scripts are basically a flow chart of nodes, like so:

 

image

 

You start by implementing a function.  All of the usual GDScript functions are here:

image

 

This enables you to handle various events within your games lifecycle.  This will create a new node on the graph that acts as an entry point:

image

 

You notice in this example there is a parameter “event” here.  With it selected you can see it’s values in Inspector:

image

 

You will notice on the right side of the Function node there is an arrow and blue dot.  The arrow is for program flow, while the dot represents output.  Other nodes can have various inputs, which are also color coded.  We can now add other nodes to our graph, from the Available Nodes section.

image

There is basically a one to one ratio of nodes and functions available in GDScript.  Add a new Node from the InputEvent section for Is Pressed, simply drag and drop from the Available Nodes to the drawing surface.  Now we connect the two nodes together.

GIF

 

You will notice the newly created is_pressed test has another line out to continue the process as well as a bool output (notice the different color coding).  We could not continue our code by branching to a conditional like so:

image

 

Of course, this is VERY early, but it does give you an idea of how Visual Scripting will work in Godot.

 

The Video

Programming

blog comments powered by Disqus

Month List

Popular Comments

Phaser 2.4 Released
Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon


Home > >

22. July 2015

Today marks the release of version 2.4 of the Phaser HTML game library.

I personally am a huge fan of Phaser, we have a large Phaser tutorial series here on Gamefromscratch. This current release is actually quite impressive in it's contents adding video, boned character support, dynamic sprites and much more. The full release announcement follows:

 


 

They don't come much more epic than this!

By Richard Davey on 22nd Jul 2015 @photonstorm

image

Phaser 2.4 is finally released! Thank you to everyone who helped track down bugs in the Release Candidates and provided fantastic feedback, it really helped shape this into a great release.

Without a doubt Phaser 2.4 is a huge update. We had to bump the version number from 2.3 directly to 2.4 because of some API adjustments, all of which are fully detailed in the Change Log. While it's true we could have released it over a few smaller point releases, that just isn't how the cookie crumbled this time. Be sure to pay attention to the previous deprecated API calls that have been removed in 2.4.

So although you had to wait for it a couple months more than usual, Phaser 2.4 is quite simply an epic release - there is no two ways about it! Brand new video component? Check. Support for fully boned Creature animations? Check. Brand new Cache and Loader updates? Check. Dynamic sprite and gradient generator? Check. Literally hundreds of updates, enhancements and fixes across the entire codebase? Yup, those too! The Change Log seems to scroll on forever, yet the overall package size continues to come down as we optimise and streamline our code too (this release actually builds smaller than 2.3 did, just 80KB min + gz)

A few people on the forum have asked how Phaser is funded: Phaser is a fully open-source project and as such we have no direct income from it at all. All development is funded by the client work that my company takes on. And of course the contributions from the incredible community (who also volunteer their skills for free).

Sometimes this work directly impacts on Phaser. For example we recently built 5 games for the new Pixar film Inside Out. Being Pixar they of course had high video requirements, so we literally coded from scratch the way videos were handled and added in video stream support in the process. Very often though our work simply uses Phaser but doesn't enhance it. Which is why if you buy any of the books or plugins we have on sale it really does make a difference! It buys us time to work on Phaser un-interrupted, which in turn benefits everyone. Some have asked if we could add a 'donate' button to the site, but instead I'd rather you get value from your money - so if we release a new plugin, book or magazine you like the look of, please do consider it a donation towards the continued work we all put in.

Money stuff aside please enjoy this brand new release. We'll carry on supporting Phaser 2 for the rest of 2015 at least, while development of the Phaser 3 renderer proceeds at a rapid pace too.

Make sure you come back to this site over the coming days, as we've still got to upload the 2.4 docs and loads of new examples. But that's all for now. I hope you enjoy this release. Happy coding everyone! See you on the forums.

Read More

blog comments powered by Disqus

Month List

Popular Comments