Branching stories

When the player makes choices that change the story the story branches. In the diagram below the player is given two options, such as going left or right, fighting or fleeing...

Unlike a traditional linear story the choices offer the chance for the player to express who their player character (PC) is. This is now a game in the true sense: the player's choices determine the outcome.

Graph of branching story

There's a big problem with this structure though: the number of elements increases exponentially with the number of choices offered. After just three two-way choices there are fifteen (2^4-1) blocks that need to be written. Add another layer and you have to add sixteen more blocks. The next adds thirty two, and so on. It's not feasible to develop all but the shortest games this way, so other structures need to be looked at.