1 free read left. Create a free account for unlimited reading + AI research.
Create free accountso there you are playing a video game and in it you come across an alien you think is pretty cute okay like really cute then once you're given the option to romance them and you sweep them off their feet the narrative of the game and a ton of dialogue across multiple other characters shifts to reference your new interstellar relationship dang how did that happen no i'm not asking for your best korean pickup lines i mean how does a game go about making all the steps in said wooing not only feel rewarding but also like it's happening in a living breathing world that other characters in the game even acknowledge well the answer to that question lies in something called a decision tree and today we're going to shake its branches and explore the complexity of decision-based game development [Music] thanks so much to brilliant for their decision to help extra credit stay sharp real quick up top please welcome back writer producer astrophysicist for star trek and my go-to expert on all things mass effect dr aaron mcdonald who wrote today's discussion thanks aaron many rpgs give the player autonomy to make a
series of critical decisions that impact the overall story you know kind of like a fancier version of a choose your own adventure book so to get started let's take a quick look at an example of one of these decisions maybe you're trying to deal with an obnoxious npc i don't know a news reporter for instance and you've had enough of the conversation the game then presents you with two options to end the interaction you can either simply walk away or punch him in the face now if you walk away that's the end of that for now but if you punch them it results in cascading events like more hostile interactions a tense relationship with this reporter and the next time you try to punch them they anticipate your move and deck you first in front of your friends and everything mortifying the experience i just described is made possible in a game via a decision tree a tool game developers use when designing choice-based games with it they map out every possible option the player can choose and the resulting effects and this allows designers to figure out all of the elements they need to build and program then each point on the decision tree where a decision needs to be made by the player is called a node when a player
makes a choice at a node the game then continues down a branch branch tree makes sense good heck even choosing not to do something would get its own branch then throughout the game each branch the player goes down cues relevant dialogue future in-game references unlocks specific items and more think of it essentially as a series of if then statements all right all right all right i did say essentially now a bunch of games have made great use of decision trees but to help show off the vast complexities they can handle we're going to dive into the epically sized mass effect trilogy not only because we think it has some of the most intricate and impressive decision trees of all time but also because it's erin's favorite game and garrus is her beloved wounded beefcake actually so we don't fall down a near infinite combinatorial math rabbit hole to start let's focus on just one slice of mass effect how many decisions do you make to end up romancing garrus in mass effect 2. to calculate this we're going to assume you had garrus in mass effect 1 and you didn't romance anyone else in that game despite the many many opportunities it gives you assuming he's
made it onto your ship in both games mass effect 2 requires you to initiate and navigate three different conversations throughout the game and select the right answers to successfully kick off your budding romance the three conversations and included dialogue options give seven nodes at which you have to choose wisely then when combining all the nodes and points at which you can fail to have a romance there are nine possible branches to establish shepard's relationship with garrus now maybe that doesn't seem like a ton on the surface or it's not surprising giving the context and number of conversations but let's think about what that means from a developer standpoint because this is a key character with whom you interact all nine branches need to be scripted recorded animated and rendered as individual scenes that feel like they flow naturally to the player and the rest of the story also we didn't factor in character options if you're trying to pursue multiple relationships at which point you get confronted and have to make more decisions which creates even more nodes and branches and that's all just for romancing one character out of the possible 12 character options dependent on your gender expression for shepard of course there are nuances to
each one but let's just carry the number of conversation options forward from our garris example to all 12 and again without adding in in-game combinations where you try to romance multiple characters you have 108 possibilities for romantic paths there's some sexy space math for you also despite the mass effect franchise really being a dating sim in space disguised as an action rpg believe it or not romancing characters is not the only decision you have to make plus shepard's journey to save the fate of the galaxy is told over multiple games and one thing that really makes the original mass effect trilogy stand out as a decision-based rpg is the ability to import all the character decisions you made in a previous game to the next one in the series now it might actually be impossible to factor in every single minute decision available along the way but even just looking at all of the major decision nodes you as a player come across when aaron crunched the numbers there are approximately 978 trillion 447 million 237
120 possible variations in the full mass effect trilogy this means the likelihood that your game is totally identical to another players is extremely rare we even had to simplify the suicide mission for this calculation which on its own had hundreds of possible branches now of course we're doing straight up combinatorics here it's possible we missed a note or two and of course we're not factoring in the success rate of garrus's dreamy eyes luring in space shepard so there is a margin of error here but all of that is to say decision trees are what let designers pull off these complex interactions effectively in order to create unique experiences for players where their choices affect the story in meaningful ways not to mention developers can use decision trees as a central reference to be able to review and debug each choice and to easily see what will happen if they rewrite rearrange or cut pieces of the game and as for the player experience you might not realize at first how different your story can be from other players so let us know in the comments below when you realize your shepherd's journey was unique that is of course until the very end of the game but in my opinion it's always more about the
journey than the tri-color destination and if today's discussion about decision trees has got you interested in learning more about the ways they're constructed you could start learning about the fundamentals of computer science right now with our friends over at brilliant you know one of the things we really love about our ec community is that a lot of us are lifelong learners people who are super passionate about leveling up our knowledge but also like doing it on their own schedule which is why we think brilliant the interactive learning environment focusing on science technology engineering and mathematics you know the whole stem set is perfect for learning at your own pace replacing traditional lectures with hands-on interactive lessons complete with visual examples and a storytelling approach that is super engaging case in point jeff has been brushing up on his fundamentals having already worked his way through some foundational computer science courses and is about to jump into some statistics and probability whereas i've been really enjoying channeling my inner mr spock and strengthening my analytic muscles with their multi-part courses on logic and deduction because i want to be able to roleplay my next dnd character as more of a holmes than a watson if you catch
my drift so if you're a curious learner professional or inexperienced you can find out more about brilliant and buff your brain by going to brilliant.org extra credits and signing up for free and the first 200 people that go to that link will also get 20 off an annual premium subscription which added bonus also helps out our channel in the process i mean if that's not a no-brainer i don't know what is thanks so much to o'reel's one kyle murgatroyd joseph blame dominic valenciana casey muscha angela valenciana alicia bramble and ahmed ziad turk for being awesome legendary patrons [Music] you
Decision trees serve as a foundational architectural tool in game design, enabling developers to create reactive, choice-driven narratives that provide players with a sense of agency. By mapping out every potential player action as a node and the subsequent narrative or gameplay consequences as branches, designers can effectively manage complex, branching storylines. This structure functions similarly to a series of conditional logic statements, allowing for the systematic scripting, animation, and debugging of diverse player experiences.
The Mass Effect trilogy serves as a primary case study for the immense scale and complexity achievable through this methodology. Beyond simple dialogue interactions, the series utilizes decision trees to track player choices across multiple titles, creating a persistent game state. When analyzing the romantic subplots alone, the number of potential paths is significant; however, when factoring in the cumulative impact of major narrative decisions across the entire trilogy, the total number of unique story variations reaches into the hundreds of trillions. This combinatorial complexity ensures that individual player journeys remain distinct, as the game state evolves based on a vast array of interconnected variables.
Ultimately, decision trees provide a framework that balances creative narrative depth with technical feasibility. They allow developers to visualize the entire scope of a game’s branching logic, facilitating the creation of a living world where player actions have meaningful, long-term consequences. By utilizing these tools, designers can craft highly personalized experiences that prioritize the player's journey, ensuring that even within a structured narrative, the path taken is uniquely defined by the user's specific choices.
Thomas Brush · 2025
Comments