Rick Posted March 18, 2013 Share Posted March 18, 2013 I've created 6 more scripts for the flowgraph. 1 is cinema bars, another is a way to start things off in the flowgraph when the scene is loaded, another is just a passthrough, and the others are variations of Random. In this example video I've combined 6 of my scripts (SceneLoaded, Sound, CinemaBars, Timer, Random3, & PassThrough) and changed the Player script for DA to enable/disable input to create this effect. Below is the flowgraph that made this interaction. I add a delay timer so that it gives the scene time to show itself for a second or so before we play the sound and give back input control to the player. Description: Follow the flow left to right. It all starts with SceneLoaded node. That disables the player input and shows the cinema bars. Show will trigger it's output which enables the timer to give us a 1 second buffer to show the scene. When the timer ticks (1 second in this case) it disables itself and then goes into the In of Random3, which will fire 1 of the 3 outputs. All 3 outputs go to their own sounds. When either are completed it goes through what I'm calling a PassThrough. This is just a nicer way to organize things and will pass the flow right through. The PassThrough Out output then hides the cinema bars and enables the player. Without the PassThrough we'd have way more lines because OnComplete to each sound would have to enable player input and hide cinema bars. I think when using Random nodes PassThroughs can help keep things cleaner as the flow comes back together. http://www.leadwerks.../videos/_/-r201 I would love to see modules and comments in the flowgraph. When things get complex, just like in any other language, we need better ways to organize them. We wouldn't put everything inside int main() and the same would hold true for flowgraphs. I would put this entire section into it's own module and the module would have a visual node itself that I would put into the main flowgraph to show it should run that module. Ideally I think when inside a module it would have a Start node that has an output called Run or something that we can hook up to start the flow of that module. This and comments would really help organize the flowgraphs. Quote Link to comment Share on other sites More sharing options...
YouGroove Posted March 18, 2013 Share Posted March 18, 2013 Yes some sort of sub Flowgraphs balck box, you could open or close. Josh said Flowgraphs was not the way to write a full game. So i'm mainly for Lua Scrips, programmers can program them and attach them to entities. Perhaps it can be more simple for people to attach some "Third Person Controller and Cam" to a character for example and just adjust variables in the panel. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Rick Posted March 18, 2013 Author Share Posted March 18, 2013 Josh said Flowgraphs was not the way to write a full game. The above is far from a full game. It's one interaction/event in the level and it could use it's own module for organization. This is no different than programming. Organization is needed to keep things easy to read and cleaner. Also Josh is at a point where he doesn't see the full benefit of a flowgraph. At one point he also didn't see the full benefit of his engine being in C++, but he does now. So i'm mainly for Lua Scrips, programmers can program them and attach them to entities. That's what all those scripts above are. They are scripts attached to entities. Perhaps it can be more simple for people to attach some "Third Person Controller and Cam" to a character for example and just adjust variables in the panel. I agree. However, that doesn't mean that script can't fire some outputs and have some inputs for other stuff. Like my modification to player.lua that enables/disable input. If you have a cut scene in your game you'll want to be able to trigger that. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.