Why Bolt?
There were two main questions I needed to answer before I know how I'm going to implement the dialogue system.
1. Do we need a node-based solution?
2. Will we use a plugin or have it custom-made?
One of the game design goals is that the world is very malleable. This means that the player should be able to impact the world a lot depending on the decisions he has made.
For our designer, this means he needs to be able to have a good overview of effects and be able to maintain it easily. To me, this screams a node-based solution.
Whether we use a plug-in or not was quite simple. We have a short deadline and we were already using a node-editor as a plugin; Bolt.
The beauty of using Bolt is that you are able to create game logic and the designer can easily change what logic is run by the player's decision.
How?
Bolt is a visual scripting plugin, this means that most logic in C# you can do in Bolt as well.
Because of this, there are 3 ways we can implement our nodes for the dialogue system:
-Super Units
A super unit is essentially a node with nested logic in it. You can define inputs and outputs on how you want to interact with it. This is great for applying the DRY principle.
-Reflected Units
Bolt can generate nodes by using reflection for the C# scripts it finds in your project.
Because they are generated they usually lack a lot of flexibility that you might have with super units or custom units.
-Custom Units
Custom units have to be created manually using the Bolt API. This is one of the more difficult ways to create units as it requires knowledge about the internals of Bolt. This is made even more difficult due to the fact that there is no official documentation and what the community provides is sparse. However, custom units have the greatest flexibility.
A great table demonstrating the pros and cons of these different units:
I wanted something that can give you an overview at a single glance like so:
This is not doable with super units and reflected units as the node’s layout is too far from what it is designed for. This is why I went for custom nodes.
After fiddling a bit with Bolt’s API this is what I managed to get:
It still isn't completely done but it's functional. Ideally, I would like to embed the choice text into the branch node but that's a little bit more difficult to do well with Bolt.
That's all, thanks for following the development of Shroudfell!
0 comments