Trending
Opinion: How will Project 2025 impact game developers?
The Heritage Foundation's manifesto for the possible next administration could do great harm to many, including large portions of the game development community.
Featured Blog | This community-written post highlights the best of what the game industry has to offer. Read more like it on the Game Developer Blogs or learn how to Submit Your Own Blog Post
Developing a detective system that tracks clues, player perspectives, and branches, empowering players to shape the mystery with their own interpretations.
Devil’s Terminal is a mystery coming of age story about a loser teen plagued by a controlling voice. The story takes place at Guidance Spiritual Retreat, a camp that promises to exorcize the problem out of “problem children.” The MC (Main Character) meets four fellow troubled kids, the camp's shady owner, a lively counselor, a quirky medium, and an omniscient computer that promises to guide the MC out of their loserdom.
Soon (like 30 minutes in), it becomes obvious that the camp is not what it seems.
There was some sort of cult here…
The computer seems to accurately predict the future….
The five kids weren’t brought here by accident…
These are just a bunch of “objective” facts. We wanted the player to decide what those facts mean to them, because, in our opinion, facts never stay “objective” for long.
We made the MC have “filters”—lenses through which they experience the world. Much like in real life, perception shapes the MC’s understanding of reality. This means the challenge now wasn't just tracking what the MC knows, but also how that knowledge is interpreted. This makes our concept uniquely cool to us, and, unfortunately, a unique pain in the ass to write.
The sweet spot between a gripping, guided narrative and an open-feeling structure is an elusive thing that many games never find. We want the best of both: tons of freedom, but every piece of content has to hit hard and feel relevant. We want the player to choose the experience they would want and then give it to them the way they want it.
Once we entered the active writing phase, it became clear that manually tracking the multitude of available facts was insanely hard. The MC keeps uncovering new clues; each clue can be interpreted differently depending on the MC's perspective; the reactions to the same clues can vary for each character; what the MC knows and believes constantly reshapes the paths available to them. Trying to manage all those branches manually wasn’t just impractical, it would also lead to a worse game overall.
This is where our attempt to design a new Detective System came in. It would help us curate the experience of each player while hiding the puppet strings behind the curtain. The system had three key goals:
Accounting for perspectives: The same fact will mean different things to different players. The same falling brick can be a result of a curse, an unfortunate accident, or even an attempted murder. We wanted the players to interpret things through different lenses—like skepticism or mysticism. It’s unsatisfying to tell a skeptic that they are up against supernatural demons, and for a mystic, it would suck to learn that their spells are stupid and don’t fit inside a realistic setting. So we let our player pick a lane and then make the story fit them, not the other way around.
Structuring the clues: We had to organize all the facts the MC gathers into Threads—groups of related clues or questions they’re curious about. Then we need to track which facts are known to which character at which point. Every one of those threads needs to fit into each possible theory. You can learn everything there is to know about a person, and then you can decide if what you’ve learned points to them being a lunatic or a prophet.
Making writing manageable: To keep the writers sane (in reality, it still makes ‘em crazy), we needed a system that would track all available story branches, what the MC has learned, how they decided to view it, and how the arcs of other characters were affected by those choices. When the MC learns something, the player decides how they will view it and who they will tell about it—all that needs to be tracked.
Now let’s look at one example of an “objective” fact and track its transformation throughout the plot. “What is the connection between the camp and the cult that used to be here?” This seems like a good question to start with.
The MC’s perspectives: Players view facts through different lenses, which then shape the conclusions they draw. This adds flexibility and lets the players mold the story with their own spicy or minty takes. We call these perspectives Rails. The Rails are:
Occult: The occultist sees everything as a spiritual journey. They are one with the universe. The universe is observing itself. From this observation, things manifest into our lowly physical world. People and things are just as real as demons, gods, and magic spells. But also, nothing is real. The Occultist embraces all things weird, understands the world deeply, and also not at all. This is the path of enlightenment and cosmic horror.
To an occultist, any connection between the camp and cult is a certainty. It’s connected not only materially, but spiritually as well. Fate, Karma, The Great Will or whatever you want to call it has brought the occultist to this place to deal with the evil spirits the cult has left behind. The camp is a manifestation of a bend in the divine consciousness, just as the cult was before it.
Skeptic: The Skeptic knows a lot but wants to know everything. There’s always a right answer to every question; there are rules in this world; there is truth that’s waiting to be found. And damn it, you will get to that truth! The Skeptic will make sense of the world one way or another, but they will never be satisfied with a supernatural explanation. The only magic thing here is how this enormous brain could fit into that tiny cranium.
The skeptic takes one look at the camp and sees that any connection would be a big stretch, since the founders of Guidance themselves obviously aren’t big on mysticism. But there are things of interest to the skeptic as well. The founders have apparently made use of some sensitive info about the cult to blackmail their way to a discount price on the land. So they might not be members of the cult, but they sure know some things about it.
Rebel: The Rebel ain’t about all that. If someone crosses them—they’re an asshole, and that’s all they are. The Rebel doesn’t care if they’re a possessed asshole, a part of a whole cult of assholes, or if it’s some bullshit like “hurt people hurt people.” What you believe doesn’t matter, but what you do does. Rebels are all about doing stuff.
What is the connection between the camp and the cult that used to be here? The rebel doesn’t care if there is a connection. The more they find out about both, the more they come to hate both. Everything seems connected to everything except for the rebel themself—they are the only one left out of everything, so they hate everything.
Other characters’ perspectives: Every character has their own story arc and what matters to them. They are mostly independent from the MC’s but still can be impacted by what the MC knows, thinks, and chooses to share. Their arcs develop alongside the MC’s, creating opportunities for them to react to the MC’s actions. The Detective System tracks this, treating each character arc as a separate Rail.
Let’s take Ivy: she’s a pathological liar and she’s proud of it. She came to the camp thinking it was exactly what it said on the tin—a stupid religious retreat for children of stupid religious parents. But game recognises game, so whatever Ivy finds out about the lies surrounding the place, the more she will grow to respect it. Present it to her any way you want, all she will hear is that this place has good PR, and she respects the hustle.
Threads: The clues are split into thematic Threads, each representing a bigger question or idea swirling in the MC’s head. These Threads aren’t just storylines—they’re the backbone that keeps the whole game together.
The original question we used for the previous examples is exactly that—a Thread.
Sparks: Inside each Thread, there are separate strings of interrelated facts, which we call Sparks. Every new discovery doesn’t just add to the mystery—it builds on what the MC already knows.
The fact that the founders used blackmail to buy the land for cheap is a Spark.
The state machine: The Sparks stack into one logical chain. If the MC uncovers Spark #3, they automatically know Sparks #1 and #2, simulating a natural flow of understanding. Clustering Sparks into Threads gives us a way to manage the player’s knowledge and easily navigate the information in a data matrix manner.
We took massive inspiration from the Sorcery!’s state machine as it was described in Jon Ingold’s lecture for GDC.
We’ve laid out the entire story on a map that not only tracks the main plotline but also every branch that can be made available by the player’s choices. This lets us visualize both the chronology and the pacing and gives us a bird’s-eye view of how the game unfolds.
Mapping out the plot structure allows us to know:
Where and how Sparks can be acquired
Where and how Sparks can be used in a conversation
Where the MC can switch between Rails and change the story
With everything mapped out, we were finally able to break up the massive writing workload into manageable tasks. Each task now lives on a task board, and seeing those “Done” statuses pop up is now what we all live and die for.
We’re still constantly tweaking the system, but, after mapping out everything, we think this new approach will let players have a voice in how the story plays out. We really appreciate when game developers consider the meta level of their own medium, so we decided to approach the “choice” side of “player choice” from that meta perspective and figure out a new way to use the player’s decision making process to shape the game’s story. If you have thoughts about what we’re doing, any advice for us, or just an interest in talking about games we would love to see you on our Discord!
Discord link: https://discord.gg/chJd8HHQXw
Authors:
Mato, director of Devil’s Terminal
Lev Gorodetskii, narrative designer of Devil’s Terminal
You May Also Like