the-challenge-of-interactive-writing-designing-a-nonlinear-rpg-like-esoteric-ebb.log
|src: blog.unity.com
The challenge of interactive writing: Designing a nonlinear RPG like Esoteric Ebb
Esoteric Ebb is taking Steam by storm – but how does a branching narrative CRPG like this come together? In this guest blog, Christoffer Bodegård unpacks complex narrative design decisions and his eight-year journey learning how to manage the creation of a truly nonlinear, dialog-based story.Ever since the first public playtest of Esoteric Ebb back in 2023, I have been asked one simple question over and over again: “How do you keep track of everything?” It’s a good question – a difficult one. Most likely, I have answered it in several different ways over the years, but never in a really satisfying way.… So let’s give it a try.(But first, a little background on Esoteric Ebb)Esoteric Ebb is a massive, narrative-focused, nonlinear CRPG. No traditional combat, almost entirely dialog-based, a playtime anywhere between 45 minutes and 50 hours, and so, so many choices… Actual choices, the type that actively changes your experience in fundamental ways all the way up to credits. Yes, it’s one of those games. And it took a while to make: about eight years from start to finish, half of which was spent doing nothing, sitting alone in a room, learning how to do interactive writing.The three constraints of interactive writingI define interactive writing within three somewhat arbitrary constraints/goals. These being:A high choice-to-text ratio>50% of content being dynamicAn open-ended designTake or leave them as you wish, but if you hit these three, then you’ve got a recipe for intense (potential) positive player agency. But immediately by looking at this you might run into a few thousand problems.Let’s go over them.Optimizing player engagement through the choice-to-text ratioWhy high choice-to-text ratio mattersA high choice-to-text ratio sounds lovely. It’s a great tool to keep the player awake and engaged, for one. If you force them to read too many blocks of text, then the average player’s eyes will just glaze over. But if you keep poking and prodding at them – forcing them to answer interesting questions, pushing them into difficult decisions, or just forcing them to respond to rude accusations – then it’s like injecting an energy drink into their veins. They’ll jolt awake, and actually engage with the text. At least, statistically they’ll be more likely to do it.The problem here is simple, though: You’d have to be insane to want to add that level of branching to your dialog. It takes a lot of work, and I think more specifically, it requires a very specific toolset. (Skills too, sure, but the tool has to be flexible and quick in order for the process of branching to not turn into an endurance test).Choosing the right toolThe tool I use is the magnificent and incredibly wonderful ink script created by the studio Inkle. By making this open-source tool – that works flawlessly in Unity, by the way – they have quite literally made my career. I owe them a lot. And ink is a tool that, apart from all the other cool stuff it does, is extremely well-suited for fast and nimble branching.When I write a dialog in ink, I write with the same speed as with linear content. As long as there is a loose design outline prepared, I can just go to town. Adding player expressions, managing visuals, or handling dice checks – all take seconds, since everything is handled through basic (mostly customized-to-fit-Ebb) tags and custom code, alongside the regular (and well-designed) ink functions.Planning for variability: Dynamic content and open-ended designBut what about item number two of our list of constraints (“>50% of content being dynamic”)? Dynamic content and open-ended (or nonlinear) designs both stem from a similar goal: to create variability based on player input.Just let them do whatever they want! Go nuts! Have an open world, where you can go in any direction! Well, that’s one way to do it. But the important distinction here is that interactive writing always focuses on an authorial-intent-driven design. In other words, everything is controlled by the writer.You can still do systematic design, and there’s a big overlap, but the practical art of interactive writing is specifically when you do not let emergent storytelling do its thing.What I mean by this is: You have to have variables. And you have to keep track of them. For every choice the player makes, whether it’s stats chosen during character creation, or how mean they were against that goblin chieftain – all of it needs some type of feedback in order to invoke the phenomenon of agency. Whether that involves a dynamic quip towards the end of the game, or an entire branching plotline, those moments of feedback are just as important as the choices themselves, if not more.Keeping track of variablesMy method of tracking variables is simple and flexible: I call it the Story Variable (SV) system. Using the tag system, whenever those tags begin with a punctuation, that indicates the usage of a variable. If that variable has never been encountered before, the SV is created in one giant list. Otherwise, it just accesses the already-existing SV, and either sets or checks it as commanded.
A string and an int – usually used as a boolean, but when needed expands to increase or decrease whenever needed. The commands I implemented for Ebb were “==”, “=”, “>=”, “<=”, “+=”, and “-=”.The question then becomes one of organization. I got better at this as I went along, but each SV uses a prefix based on the location or quest. “TE” in this case refers to the Tea Shop area. An SV with the “Q” prefix refers to a quest, and a “QP” refers to a Quest Point –as in, a log entry in the Questing Tree, your quest journal.Narrative design gainsIt’s a rough system, with one major productivity gain: You can just keep writing. Need a new variable for a dynamic dialog choice? Just add it, then copy-paste it into the file where it needs to be set. Easily check for any variable usage via a project-wide CTRL+F, or manage sweeping changes via basic text management. There’s no database to manage. The list itself is just chronological. Forgot the name of a variable? Just search for the relevant area or quest prefixes, and look over the list.I did not expect this to work at first. An average playthrough can end up with more than 3,000 Story Variables in that list by the end of the game. But – like with most things I did on Esoteric Ebb – Unity just worked with it. And ink’s Unity integration has never failed me, not once, even after using it for almost a decade now. A recompile of the ink files takes seconds. Customizing the features to Esoteric Ebb’s liking has always been extremely efficient. And as strange as it might sound, I’m still surprised all these years later that it just flows. If I am able, I want to keep developing this pipeline for years to come.Beyond that, I use Notepad++ for all my writing on Esoteric Ebb. While you could obviously use any text editor of your preference, keeping it lightweight and snappy makes for such a smoother experience. Searching through a million words in a split second is exactly what allowed me to write (and to bugfix!) such a massive game.Final thoughts: Bugfixing and learning to embrace the branchBut that’s also the biggest negative of this system: the bugfixing. I should have invested more time in technical solutions to broken logic and syntax, but really, I ended up just brute-forcing the whole ordeal via playtesting.As Esoteric Ebb receives its 1.1 patch, I have managed to fix approximately 704 ‘text errors’ – whether spelling or code related – in less than four days of work (very chill days, too). This is, again, because the system is extremely nimble. Even still, those bugs were there when we launched Esoteric Ebb because of the setup here as well. It is an insane amount of text, with a ridiculous amount of branching. But I am also certain that I would not have been able to write even a quarter of the final word count had I not been blessed with ink.Afterword: More recommended tools for narrative designersink makes the practical art of interactive writing a fast one, for me. I’ve always had trouble with visual scripting, but I know many writers have the exact opposite problem. So I always recommend looking into other solutions as well to find the one that fits you and your team the best, with some examples being articy:draft, Arcweave, and Yarn Spinner.Esoteric Ebb is available now on Steam. Explore more Made with Unity games on our Steam Curator page, and check out more stories from Unity developers on the Unity Blog and Resource hub.