-
Notifications
You must be signed in to change notification settings - Fork 7
Cookbook
The LUTE Cookbook provides examples, source code, and links which can be used as a base for your experience or as a point to learn from.
Good luck and have fun!
Where links have been provided, simply download these and import the packages then follow the instructions for that specific example.
Some examples are provided as Blueprints so please follow instructions on how to import the specific example and then follow the instructions.
Some examples may actually be more complex tutorials which require digging into the code for LUTE, in this case you can either copy over code or download specific files to use as a base for that specific example and tutorial.
To start off, let's try to create a simple game set in Avebury, where you have to go around to a few set of stones, each one of them telling you a story about it, and you having to decipher from the clues the "hidden" stone underground.
Create a new scene, and make it completely empty - we will be using one of the prefabs that contains most of the things you need to start. This prefab is located under Assets->LUTESampleExamples->Prefabs and is called BasicGame.

Take that and drag it into the scene, so now your Hierarchy should look something like this

Open up the Flow Engine window, and let's start making the game!
We need a start node, so the engine knows where to start from. I am using one of the already predefined custom nodes, the Start node. Just right click anywhere within the Flow Engine, and select that.

Click on the node, and the inspector should pop up on the right, like this:

I'll rename the node for easier readability to Start.
Next, let's make a simple menu, so that the player can chose to either Start the game, or Quit it. To do this, create a new node by right clicking and selecting Add New Node. I will rename it to Main Menu, and add 2 MenuChoice orders to this node (I am using the very handy search feature to find it faster):

That order needs a target node for when the player clicks on it, so click on the first order, and point it to the Start node we created earlier:

The Flow Engine window should look something like this, where the Main Menu has an arrow pointing to Start:

Don't forget to change the Text of each choice, in this case, the first button would be Start, and the second one would be Quit. We also need to create a quit Node, so that we can point the Quit button to that. I created a new node, set the Node Name to Quit, changed its colour to red (to make it pop out a bit more), and added a Quit/Exit order to it:

After you connect the Main Menu to Start and Quit, it should look like this:

Now, to actually start adding some narrative to the game!
I want to start off with a dialogue box that introduces the player to the game, a "Tutorial", and goes through what they need to do. To do that, I create a new node, and after changing the name and description, I add a Dialogue order. In there, I can edit things like what the text is going to say, the typing speed, fading, etc. For now, I give a short introduction with the place and premise.

I can add another Dialogue order after this, which is going to be played after the player clicks (as you can see in the screenshot, I have ticked Wait For Click). This is what the second piece of dialogue looks like:

Note that I selected Fade When Done, as I want it to go away to let the player move on. All that is left to do now is connect the Start node to the Start Dialogue node, and you can do that by going to the Start node, and adding a Next Node order:

Your Flow Engine should look something like this:
