Pre-Planning for a New Game Project
A small adventure where every problem has many solutions.
I've been wanting to take another stab at game development again, and have been mulling over my fair share of ideas. One notion has stuck out to me, though, and I think it has legs: make a game where every problem has multiple solutions and different outcomes.
Some part of my brain is already groaning at how hard this might be to implement. In a linear game with limited solutions, coding the story from start to finish is relatively straightforward. You're just relying on set conditions that have to be met before progression can happen.
In this alternate approach, every problem can be solved with a wide array of options, possibly going far off the established path. Most people would say "That way lies madness!", but I am not Most People.
God Save the King
The concept I've been cooking up is pretty fun: it's a reverse whodunnit. You're a court jester in an obscure, far away kingdom. The king, who has reigned for many years, is suddenly acting very paranoid, because he keeps having dreams about his impending death. As the king becomes increasingly unhinged, the members of his court drop hints about their safety, and seemingly suggest that someone should "take care of him".
It's up to you to figure out what that means, and how to do it. Do you kill the king? Do you save him? Is there a way to frame someone else for the murder?
The key idea here is that your involvement, and the ultimate goal of the game, is left for the player to decide. As time passes, disasters happen, and the King becomes more and more unhinged, sending random people to their deaths in a mad attempt to protect himself.
What I really like about this is the idea that there could be many different ways to approach the problem. Let's say that you decide to take the King out. Do you sneak behind the disgruntled chef and poison a meal? Do you steal a spell from the court wizard? Maybe the vizier is already plotting something, and you could be his useful fool. This scenario opens up so many different possibilities.
The Hard Part
So, this all sounds great, except for one thing: continuity. If I did this, I might have to plan for many, many different contingencies to decide which way the game should progress. Bad coding could lead to a break in continuity, where outcomes don't correctly match up to whatever actions led up to them. I would have to juggle many variables to decide what track to take.
But...maybe there's another way to think about this, by defining a certain kind of modular structure.
Outcome-First Development
One thing I've been thinking about in solution to this problem has been to define a series of set outcomes before committing any code. These would act as fixtures within the game, where a series of decisions still lead up to predefined conditions, regardless of what actions are taken.
Let's say that I end up writing 12 different ways to win the game. Ordinarily, I would have to develop 12 different tracks of events, and try to account for every single one. But, if I define the outcomes first, I can group these 12 ways by their intended outcomes:
- Kill the King directly, get hanged for it.
- Frame someone else, they get hanged.
- Save the King from someone else.
- Do nothing, let events unfold.
Suddenly, I only really have to worry about four outcomes, and can group different means of achieving these outcomes to their respective tracks. I would still need to account for whatever happens in the story, but a lot of things can be passed as parameters during an outcome's related sequence.
- You frame the chef. During the "frame someone" outcome, the Chef's character is set as the guilty party who gets confronted at the end. The Chef hangs instead of you.
- You stay at the King's side and protect him. He doesn't die, and eventually gets better! Maybe there is another culprit who gets confronted.
- You kill the King yourself, you get hanged.
- The King dies in a seemingly random accident due to your inaction. You are never to blame.
There's still a lot for me to think about, but this seems like a clear path towards achieving what I what, while reducing complexity.