As a fellow developer and now that you've finished several games, I'm curious what you think about Unity and the engine you built as an effective way of translating/porting visual novels, both in terms of technical performance (which doesn't REALLY matter, but it still interesting) and ease of use.
Working with unity as a game engine has been a really solid experience. Sometimes it can be rocky with engine bugs or support, but overall a positive experience. Using unity allows me to ignore a lot of the low level challenges you'd normally face with making a game, and lets me focus directly on the logic. It does take a bit to get into the swing of unity's programming style, but it really works well. The whole process is simple enough that generally when it comes to porting a new game I actually start over from scratch and rebuild each of the components, since each time I come up with new ways to make things better or more efficient, and often the requirements change from game to game.
The basic design for a visual novel is simple. The core of the is the Scheduler. The main loop checks to see if the scheduler queue is empty, and if it is, it fetches the next command from the game script and executes it. If the queue is not empty, it simply waits. The queue contains any and all tasks, from loading a texture, displaying text, to waiting for user input. Most tasks can be interupted by user input, so if you click the mouse or are in text skip, it will finalize any interuptable actions, such as transitions, typing text, moving a sprite, and so on and move them to their final state. The scheduler just keeps looping, and keeps executing actions as the queue empties and tasks are completed.
The visual aspect is handled by a scene manager, which handles the transitions and various display layers. There are two cameras in use, one representing the foreground (what you can currently see), and one representing the background (not yet visible content). When playing, the script it will load content into the background layer where it is not yet visible, and then when asked, the foreground will fade out in some way, revealing the new content in the background scene. By this method, we get crossfades annd transitions. Once the transition is complete, the background becomes the new foreground, and the foreground content copied over to the background.
Of course, individual game engines bring various unique requirements. Buriko engine (d2bvsdd, MG's version of Higurashi) has a complex script format, and allows for crossfades and masked regions within individual layers, outside of the standard scene transition process. In Cartagra, the game allows you to specify animatable rectangular regions from both the source texture and destination screen space, to perform complex pans, zooms, and other effects. So the final implementation can vary quite a bit.
To answer the main question then, unity takes most of the difficulty out of the process. I've also had no real issues with performance, though it's simplified by visual novels often having periods of no on screen motion where you can hide frame drops without the user noticing. I've gotten to the point where I can get the basics working over a weekend, which says something about how easy it is to work with.
The basic design for a visual novel is simple. The core of the is the Scheduler. The main loop checks to see if the scheduler queue is empty, and if it is, it fetches the next command from the game script and executes it. If the queue is not empty, it simply waits. The queue contains any and all tasks, from loading a texture, displaying text, to waiting for user input. Most tasks can be interupted by user input, so if you click the mouse or are in text skip, it will finalize any interuptable actions, such as transitions, typing text, moving a sprite, and so on and move them to their final state. The scheduler just keeps looping, and keeps executing actions as the queue empties and tasks are completed.
The visual aspect is handled by a scene manager, which handles the transitions and various display layers. There are two cameras in use, one representing the foreground (what you can currently see), and one representing the background (not yet visible content). When playing, the script it will load content into the background layer where it is not yet visible, and then when asked, the foreground will fade out in some way, revealing the new content in the background scene. By this method, we get crossfades annd transitions. Once the transition is complete, the background becomes the new foreground, and the foreground content copied over to the background.
Of course, individual game engines bring various unique requirements. Buriko engine (d2bvsdd, MG's version of Higurashi) has a complex script format, and allows for crossfades and masked regions within individual layers, outside of the standard scene transition process. In Cartagra, the game allows you to specify animatable rectangular regions from both the source texture and destination screen space, to perform complex pans, zooms, and other effects. So the final implementation can vary quite a bit.
To answer the main question then, unity takes most of the difficulty out of the process. I've also had no real issues with performance, though it's simplified by visual novels often having periods of no on screen motion where you can hide frame drops without the user noticing. I've gotten to the point where I can get the basics working over a weekend, which says something about how easy it is to work with.
Liked by:
Kouryuu