It’s time to introduce the extension that is responsible for this whole mess!
I discovered the Unity extension ‘Fungus’ rather by coincidence, I can’t even remember when and how exactly. The project is being managed by Chris Gregan, who keeps a regularly updated blog on gofungus.com, a support forum and a showcase site. The man’s awesome.
To sum up what this is about:
If you want to create a game and know Unity a little bit, you can simply place your assets on a stage – the canvas – which will later be displayed on a device. The graphics are being programmed via scripts. You define what a button is and which textfield is showing which text, or which animation should be running where and how often.
All of that is relatively simple for a ‘Zork’ clone, and even there you can lose track of the storyflow if you don’t structure your work. Fungus shows nearly all of its functions on a graphical interface.
You define which view (camera) is supposed to be used, which buttons are leading where and much more. In my app project I use a canvas which is scaling in height. If a tablet or phone has a wider display, the screen shows more of the outer area, but all the text and main functions are always placed in the center frame.
The aforementioned ‘much more’ of the functions list includes ways to handle text. It’s incredibly easy to define a few styles for the many many pages of text to come, so that you don’t have to layout every single page. Also multiple choice menus are easy to adjust, and they even react dynamically based on the amount of choices.
The second, even more important feature is the flowchart system, which also represents an important part of the interface. Without this visualization of the dialogue tree, I might have already given up by now.
The flowcharts don’t just show the position of the story, you can also add visual and sound effects that are displayed during the game. The extension offers lots of tools and if you have enough creativity, you can have lots of fun with it. I saw a whole different kind of game in a classical desktop layout and simply moved assets around, so that it would fit my game.
It’s possible to navigate and control all the functions of a game via Fungus, but you don’t necessarily need to. You can change a dialogue layer to function as a popup, but you can also create a classic popup canvas in Unity and write a function for it. You can be creative and find a solution for every problem. There are already quite a few indie games which only use the flowchart dialogue function but come up with the rest by themselves.
Fungus is an open source project and can be supported via donations. If you’re not afraid of Unity, I highly recommend you download it from the asset store and have a look at it. There are already many tutorials which show how to install it (+Unity) and how to create your first narrative game.