I map all the branches and write each one like a seperate story. Don't take advice from me, though.
Heres a handy article and all that.
Actually, I'll just paste it as well >_< This is taken from the article i linked above.
Ways of writing storygames
There are 3 basic ways of wrting a gamebook. There isn't a golden way of making a game, it just depends on you and which style suits you.
1. Just Write It Method: In this method, nothing is pre-planned. You just write a paragraph and let the story shape itself while writing. Then you give choices and then ultimately more choices. When it all starts making sense then you tie everything in a plot. After the story is finished, you flesh out the paragraphs and add few more pages.
This method has an advantage that you will write everything on the fly (hence creating some of the best) and you won't be bored of the tedious planning. Although, there are many disadvantages like- you'll give up in mid, your story will sprawl so heavily that you'll be not bothered to continue or you might end up creating an absolute garbage.
Examples of stories written with this method: Bloodlines by me, Outlaw by me.
Planning: In this method, you create a flowchart which shows all the pages and all the choices linked to each other in your story in a branching tree like fashion. It works as an outline and gives you a record of your progress. You write according to the flowchart, perhaps changing some of the pages and choices but mostly sticking to it. This is the most widely used way of wrting gamebooks.
Advantages- You have a record of your progression rate and you will never get lost. You will be able to create complex games with epic storylines. Disadvantages- The biggest disadvantage is that that you'll easily get bored. I won't deny. I have created over 50 flowcharts but never actually started working on them. They seem like a work. Possible solution- Maybe you could divide the whole story into bits. Like creating a 20 page flowchart of chapter 1 and writing it. Then creating another 20 page flowchart of chapter 2 and wrting it before moving to chapter 3. It seems to have worked but I haven't tried it.
Games made with this method- Vampirium by me, All major gamebook series.
3. And One Method: In this method, you basicaly mix the above two methods and keep jumping back and forth between them. You plan a storyline, divide it into chapters, then write them using the Just Write It Method but limiting yourself among the boundaries of the story. Or you make flowcharts in mind and expand them as you progress. This method is great, and I prefer it over the other two. As far as I know, most of the stories on this site are writting with this method.
Advantages- You won't get bored. You'll have a limited record of your progression. You will be free. Disadvantages- Of the above two methods but in a minor way.
Stories written with this method: Order of the Midnight Sun by 3J, Homo Perfectus Series by SindriV, DMW by BZ, Star Wars Series by Skills, Vengeance by Badger, all of Endmaster's stories.
You will have probably realized that most of the better stories on this site are created with the third method. But that doesn't mean that it will work for you too! LOL.