DEV Community

Cover image for Creating a Multi-Level Visual Novel in Unity: Rat in the Trap - Dialogue System
Angela Rodriguez
Angela Rodriguez

Posted on

Creating a Multi-Level Visual Novel in Unity: Rat in the Trap - Dialogue System

After several weeks of development and several more weeks of bug fixes, my 2D survival-horror visual novel is fully completed! As a multi-part overview blog of the sections that I completed for my game, I will be reviewing each essential aspect that was both challenging and rewarding to learn in the Unity Engine.

Table of Contents

Organizing Story Scenes

In the creation of this dialogue system, since I had originally created such a system previously in my first game jam project, Remnants of Us, I implemented a similar format.

In this project, both my previous game and this project, I referenced AD works immensely helpful visual novel tutorial in order to construct the base of my dialogue system.

First, we must clearly define the different objects for which the text is going to be displayed. These include the text, which will display our lines letter by letter, and the names of the characters who will be speaking.

Building the Different Story Scenes Together

One thing I found helpful and informative to learn in regards to the setup was the creation of an Asset Menu and Scriptable Object. This allowed for the manipulation of different variables within the code, including the different lines that each character will speak and the name of the character that is speaking. Originally, I believed that the collection of multiple different story line data together would be messy, but this assembles the different lines efficiently and makes each scene appear at perfect timing.

Challenges Faced

Some challenges that occurred throughout the project were having the animations for each character occur within certain lines and moments within each scene. In order to account for this, there needed to be a new data structure added to the scene menu that would dictate the scene name. Additionally, in code, you would need to check the sentence index and when it would occur within the game.

Conclusion

Overall, this setup provided an excellent framework that would aid in the later mechanics I developed for the project. For instance, in the next part, I will discuss how I implemented the choice options that occur within the game. Thanks for reading!

Top comments (0)