Here's the story behind the first NPC (non playable character) that you talk to in Twisty's Asylum Escapades. This is also an example of the kinds of challenges that game developers have to regularly solve when plotting gameplay.
When we were first developing Asylum Escapades, the player's progression through the game was even more chaotic than it is now (if you can believe that's possible). The problem all stems from the fact that this game is fairly nonlinear. Although it's all contained in the same building, it's all completely open to the player in a very maze-like layout, and the player is permitted to go in multiple directions right from the beginning. There really is no set course the player has to follow. Originally, we thought this was a pretty cool feature which provided opportunities for exploration and for the most part we still do. But it did create some interesting challenges.
Twisty using his bite-and-shake attack on yet another victim
Through play testing of the Alpha build of the game, we found that test players weren't figuring out how to use a certain type of attack which was critical for making the game interesting and more enjoyable (specifically Twisty's bite-and-shake attack). The solution to this was fairly simple, we would just need to provide a tutorial for the player early in the game so they would know how to use it from then on. Through our play testing, we knew which direction most players would go and what room they would end up in. We even found a way to tie the tutorial in with an element of the story so that it made more sense and gave the player even more of a payoff than simply learning how to do this attack alone would. The whole thing came together exceptionally well and actually solved several problems. Unfortunately there was just one catch, we still couldn't guarantee that the player would actually always go to that room the first time they played the game. We knew that a lot of players would do it automatically based on play-testing, but any player could still technically go in one of two other directions and completely miss the tutorial, which was now an essential part of the game's progression.
Of course we did what any reasonable people would do to solve such a simple problem; we introduced some criminally insane characters into the game to bark murderous orders at you in a snarky and condescending way. Basically we needed a way to direct the player to go the right way, but without physically blocking off the alternative routes (we still wanted to keep the floor plan of the asylum open and maze-like). We decided that one way to do this would be to have NPCs simply tell the player which way to go in the beginning, to give our crazy brain character some friendly advice. But who would want to help this crazy brain escape the asylum? Why other crazy inmates of course!
This seems like the type of person you want to take advice from
This gave me an excuse to use a character that I had designed but couldn't find a place for in the game and it also allowed me to make the basement halls even more interesting by having these Hannibal Lecter/Silence of the Lambs type of cells in the basement. This even added a bit more of a story element to the game and had the added benefit of making the player's progression more obvious and gave them more sense of direction.
We set up a system to cover all possibilities, no matter which way the player goes they will either have to go by one of these inmate cells, in which case they will be stopped by the crazy person inside and given instructions to go to the tutorial (because everyone knows you should stop and listen to random crazy people), or they will simply go directly to the room with the tutorial. The only way that this system fails is if the player, after having been stopped by the inmate, clicks off the text without reading it and just continues on (in which case the player will have no choice but to either come back to the inmate to read it again, simply figure out where to go themselves, or just be lost wandering around the building). Unfortunately no system is completely foolproof and as a developer there's a certain point where you have to draw the line in regards to "hand holding" with the player, and that's where I decided to draw that line. If you refuse to read the text and yet you still can't figure it out by yourself, then you're just lost (both in the asylum, and as a "cause").
But all and all it was a fairly effective solution and added several more elements to the game. It's also a good example of the kind of creative problem solving what video game developers have to utilize on a regular basis. Weird problems often come up in game development and it's up to the developers to find creative ways to let the players know what to do. Players normally don't like it when you spell things out for them too much, and yet at the same time you have to be clear enough so that most players are still going to get it and continue to enjoy the game. Sometimes this can be as simple as tweaking certain settings, sometimes it means changing the layout of a level, or creating interactive tutorials to show the player how to do things, giving them subtle clues to push them in the right direction; and sometimes it means having a crazy guy in a straitjacket stand there and tell them to go down the freak'n hall and perform a human sacrifice to summon the spirits of the dead into the asylum. You just have to sort of finesse these things.
I hope that you'll continue to follow along with these developer blogs of madness, chronicling our remastering of Twisty's Asylum Escapades; the game that's made for, and by, and prominently features some surprisingly helpful but very psychologically unstable characters.