How to Make a Visual Novel in Unreal Engine 4

A little over a year ago, I set out to complete a strange task: I wanted to build a visual novel in Unreal Engine 4. To some people this seemed like using a rifle to shoot a fly. I was even prepared to admit they were right. But once I got deeper into the UE4 engine, I didn’t regret a single thing.

Why UE4?

The short answer to why I love using Unreal Engine 4 is this: the engine can accomplish just about anything I imagine, and it can do so quickly. It’s a wonderful engine to work with and it’s capable of so much.

That said, Ren’Py is still a wonderful tool to create traditional visual novels. If you don’t plan on adding 3D elements or complex mini-games to your narrative, then there’s probably no reason for you to switch to UE4. BUT if you want to expand the boundaries of a traditional visual novel and set yourself apart from the other VNs out there, I can assure you that UE4 might be a great tool to accomplish that.

Screenshot from our UE4 visual novel, Echoes of the Fey: The Last Sacrament

How to Get Started?

When I started my first VN project in UE4, I struggled to find helpful resources. Not many people had tried to create a traditional VN system within UE4. I found a VN marketplace plugin, but it only functioned for very small-scale projects, and was completely unwieldy in terms of handling a large script or rewrites. So after a lot of searching and banging my head against the computer screen, I set about building my own system from scratch.

Now, one game and many months later, I want to share what I’ve learned with the game dev community at large. I’ve started a video tutorial series that will help you build the foundation of a VN system within UE4. This system is designed to handle large-scale projects and gameplay elements beyond just dialogue. You can begin by writing your script in a typical Open Office or Word document, then convert it into a spreadsheet and import it into UE4.

Watch the Video Tutorials Online

Part 1: https://youtu.be/qj_6dfzqaO0

  1. Create your text scene in a spreadsheet (4:05 )
  2. Create a structure in UE4 (8:45 )
  3. Import your first scene as a datatable (13:02 )

Part 2: https://youtu.be/KuHardkG37M

  1. Create a Scene Template Blueprint (1:09)
  2. Create an NPC character actor to launch the scene (2:56)
  3. Enabe click events (6:30)
  4. Spawn Scene Template when NPC is clicked (9:15)
  5. Feed the datatable rows into the Scene Template (13:57)

Part 3: https://youtu.be/ljaf1PHGq1Y

  1. Track the scene array with a Row variable (1:36)
  2. Create a widget to display the dialogue (4:08)
  3. Set text variables within the widget (9:18)
  4. Create widget from Scene Template and track as variable (11:14)
  5. Set widget variables from the Scene Template Blueprint (13:18)

Part 4: https://youtu.be/w7LxY8fZzdc

  1. Add dialogue widget to viewport (0:44)
  2. Track whether the row is finished displaying (2:11)
  3. Add an input to advance the text (4:26)
  4. Increase row number for next line (5:23)
  5. Enable input on the Scene Template (7:00)
  6. End scene and destroy actors when scene is finished (7:58)

Support us on Kickstarter!

In the tutorial series created so far, I don’t yet get to branching dialogue or character sprites. But if people find this first series useful, I may go on to create tutorials about that later. You can also find my posts about the VN system on the UE4 Forums.

Meanwhile, we’re running a Kickstarter for our current visual novel project, Echoes of the Fey – Fantasy Visual Novel Series! If you enjoy my work or find my resources helpful, please support us!

Why We’re Making Our Next Visual Novel in Unreal Engine 4

We’ve been quiet over at Woodsy Studio for the last month or so, but with good reason: we’ve been busy! Shortly after releasing Echoes of the Fey: The Fox’s Trail on Steam, we decided to switch our development platform from Gamemaker Studio to Unreal Engine 4. This is no simple task. For Gamemaker, we had a very helpful base to build off of with ThinkBoxly’s EdgeVN system. With UE4, we don’t have such luck. There is a module for sale, but it seems unequipped to handle large multi-scene VNs, so we are building from the ground up using the UE4 blueprint visual scripting. On top of that, we’re converting to 3d backgrounds, which means re-making a lot of our general world assets to 3d models.

Most people are totally confused when we tell them we’ve decided to switch to UE4, and that’s without the troubles mentioned above. UE is best known for big-budget 3d games. It isn’t known for indie development or user friendliness. Unreal is total overkill for a visual novel, especially when the most GPU-intensive thing we’ve pushed out in previous games is a high resolution character sprite. So, why are we going to all this trouble to switch to an engine that is (on its face) worse for indie 2d development than our previous platforms?

To start, I need to go over the problems we had with Gamemaker. I don’t want to make this post a big list of complaints about GM–which I think is fantastic for certain kinds of projects–but addressing a couple of these is unavoidable. First off, audio files.  The way GM handles audio files was frustrating from start to finish. Importing them was clunky. We couldn’t make batch changes to groups of sounds. And a couple times, references to entire groups of sounds just disappeared.

These would be annoyances for any game, but because of the nature of our (partially) voiced visual novels, we had over 2,500 sound files in our game. Any task related to the sound was a huge ordeal for us and, in the end I think the sheer number of sounds ended up creating our other problem with GM: porting.

Our first (still work in progress) screenshot from Episode Zero

Our first (still work in progress) screenshot from Episode Zero

Before we switched to GM, Woodsy Studio was releasing its games on Windows, Linux, Mac, and Android phones. However, so far we’ve been unable to bring The Fox’s Trail to any platform other than Windows. The problem is different on each platform, but without going into too much detail, our suspicion is that our sounds (or more specifically, the size of our sound files–2.8 gigabytes before compression) have something to do with it.

Finally, drawing backgrounds has been one of our biggest hurdles. Every room requires a background and these are Jenny’s least favorite thing to draw. They are also large, contiguous sprites that are difficult to break up into 1024 x 1024 pieces to keep our texture page size down (which is needed for performance reasons, especially on mobile). Moving to 3d environments is theoretically possible in GM, but would require rebuilding a huge amount of what we’ve already  And it’s not what the engine is designed for.

I really do want to stress that Gamemaker Studio is a very good option for all sorts of games, we just decided it wasn’t right for us. Because going forward, these problems were only going to get worse. For episode 2, we’ll have the same–if not more–quantity of voice acting clips. We’ll want more backgrounds. And we might want to go to native a native 1080p resolution, at least for the PC version–further exacerbating file size and background creation issues.

All this added up to need to change. But again, the question comes up: why UE4? Why not Unity, which seems to be the favorite choice of indie devs everywhere? A couple reasons. No matter what engine we switched to, we were going to have to re-learn everything. Ren’py uses python and GM uses gml, its own language, so there was no real chance of transferring our knowledge perfectly over to either of our options.

A UE4 material we made for our visualization of a fey rift.

A UE4 material we made for our visualization of a fey rift.

Also, out of the (metaphorical) box, UE4 is fantastic at making your game look good. I don’t entirely know how the guts of either engine work, but it seems very easy to use the UE4 cameras and lights (as they are implemented without plugins) to make our art pop compared to what I’ve seen of Unity. And the material system lets (relatively) inexperienced programmers do some amazing things with shaders in a visual scripting interface.

Finally, I’ve always been a bit of a contrarian and everyone using Unity because the common knowledge is that Unity is more user friendly just makes me want to go down the road less traveled. And we’ve discovered that this common knowledge might be wrong.

It has been just over a month and a half since starting the conversion and we already have a full dialog system set up (developed by us from the ground up), with working choice menus and overworld exploration like in The Fox’s Trail. We’ve built out our first environment and imported the first handful of scenes for Episode Zero. Converting to 3d environments has allowed me–a person who couldn’t draw if my life depended on it–to take over a portion of the art process, building 3d models based on our original drawings. This required learning Blender along with Unreal Engine 4, but for a long time the art burden has fallen entirely on one member of the team and I’m more than happy to finally help out.

An Episode 1 asset re-made in 3d (again, work in progress).

An Episode 1 asset re-made in 3d (again, work in progress).

At first, I likened trying to make a visual novel in UE4 to using a rifle to kill a fly. Yes, it can get the job done but it will be harder and a ton of overkill. Now, I’d use a different tortured metaphor: it’s like putting together Ikea furniture with powertools. It’s still overkill, but the power tools have a lot more uses than just putting together Ikea Furniture.

So, when is Episode Zero coming out? Right now, we’re tentatively saying “TBD: Winter”. And yes, we mean this upcoming winter. I don’t think we can commit to anything more than that, but since we have so much of the framework already done and Episode Zero is a smaller project, we hope that you’ll be able to enjoy the first visual novel developed in UE4* fairly soon.

*I don’t know if we’re really going to be the first UE4 VN. I couldn’t find any. Correct me if I’m wrong!