Creating Hypertext Fiction
Written by Akabax

Hypertext Fiction are interactive stories. At the end of each paragraph is several links, each leading to a new paragraph. The reader is in this way able to control how the story developes.

They are normally written in Second Person, so that the reader acts as the protagonist. The links determine how he will act in the story. The Fighting Fantasy Game Books of the Eighties were structured the same way.

The beginning of a Hypertext Fiction story could be like this:



You are in your room. Your girlfriend lies in the bed, in her white satin underwear. She moans softly.

What will you do?




I think hypertext stories has some great potentials. I hope this text will inspire some authors to give it a try.

I have created only one hypertext story. (Skip it if you're not into homosexual and racist stuff.) It can be seen here.

How to write
Hypertext Fiction

The basic way of writing hypertext fiction is this:

1) Find out what your story should be about. Make a lot of brainstorm. Be aware that it won't be a liniar story, so you need to develope a lot of different storylines. Develope the characters, create the setting and all that.

2) Find a pencil and a piece of paper, and make a chart of the story. Make a box for each paragraph, with arrows to the other paragraphs they links to. You should end up with a lot of paragraphs, at least fifty.

3) Write the paragraphs. It's most easy to write one branch of paragraphs to the end. Then you find the paragraphs linked to from the end of the finished branch, and works your way towards the start. If you don't understand this, it is okay. Just remember to write the number of each paragraph you have finished on your chart.

That's it. The technique of transforming it into an interactive tale is explained at the bottom. First, a bit more about how to write it:

How long should
the paragraphs be?

The paragraphs should be kept somewhat short, So the viewer can read them without having to scrool down. Longer passages of text can be divided into several passages, ending with a single-choice link to the next part.

Branches

If you write a story where each paragraph has two choices, it will quickly become a larger project. Let's say that the story will end after five paragraphs.

Now to create a chart:

As you see, to create a story where the reader steps through five paragraphs, you will need to write a total of 31 paragraphs! And it would quickly grow larger!

However, it is possible to make longer stories. The trick is to give the reader choises, which leads to the same paragraphs. For instance, the reader can either invite the very hot chick on a drink, or say an extremely lame pick-up, line. Both choices will later lead to same paragraph.

A chart of it:

The example above is a bit primitive. The trick should be used in a more advanced way, where the branches only leads to the same outcome over time.

You can also let some options lead to dead-ends: The protagonist dies, the chick turns him down, or whatever.

Despite those fine tricks, a good piece of Hypertext Fiction should consist of a lot of paragraphs.

Point of View

Second Person Narrator has one disadvance: If the narrator male, it will scare off the female readers, since they don't want to read a fantasy where they have the role as a muscular stud with a large willy. On the other hand, a female narrator will scare away the guys, who don't fancy the role as a bimbo with big bouncing breasts.

So while Second Person is the natural choice of narrator in Hypertext Fiction, Third Person might sometimes come in handy. Third Person is also good for non-human protagonists like dogs, robots or demons.

Purpose

What should the goal? There don't have to be one. The story can just be a fantasy, where the player can choose his kink. But since most people likes a challenge, it would be wise to give the player some kind of task, some kind of purpose.

There don't have to be one single goal. It can also be a goal which the player can strive towards, with more or less succes.

Another option could be a story which have absolutly no pornographic parts, until the reader steps through the story in the right order, and gets to the reward.

The Technical Part

When you have written all the different paragraphs and given each of them a number, you need to transform it into some very simple code.

Below is a example of how it looks:


PAGE 0
You are sitting in a bar.
Suddenly you hear a noise behind you.
CHOICE Turn around 1
CHOICE Act like you hasn't noticed it 2

PAGE 1
You turn around, and discovers where the noise came from...

PAGE 2
You sits still, wondering what that strange noise was.



Let's take a look at the code:

PAGE 0

This indicate the beginning of the first paragraph - the one displayed at the beginning of the story.

You are sitting in a bar.
Suddenly you hear a noise behind you.

simply lines of text, displayed at paragraph 0.

CHOICE Turn around 1

CHOICE indicates the beginning of a link to a new paragraph "Turn around" are the text which are displayed. The number at the end, "1", is the paragraph we will appear at when clicking on the link.

CHOICE Act like you hasn't noticed it 2

Another link. This one displays the text "Act like you hasn't noticed it", which links to paragraph 2

PAGE 1
You turn around, and discovers where the noise came from...

PAGE 2
You sits still, wondering what that strange noise was.

This are paragraph 1 and 2, which paragraph 0 has link to. Each of them displays a line of text.

Thats it .. Note that PAGE and CHOICE will have to be all uppercase. Please note that the very first line of your document should be PAGE 0

Try pasting the code from the grey field into the input field below, and click on "Test" To get back, use your browser back button.

Write your story in a seperate dokument, using your favorite text editor. When you want to save your interactive story simply copy the text into the input field, and click on Generate. The code will then be generated at the field below. Copy the generated code to a text editor, and save it as hypertext.html (or another name).

Please note that the javascript in this don't work in Firefox. Internet Explorer works fine.

Paste your interactive story into this field:

Test your code by clicking here:

You can also the code in the input field below:

Advanced stuff

If you know javascript, you can use this to make some even more ingenious adventures. Any javascript code should be started with CODE. For example:


PAGE 24
You: "I love you. You are not very ugly." You says.
CODE seductionPoints = seductionPoints + 5;



Stuff to create with Javascript

  • Create random events.
  • The readers choices can be remembered in a string, and affect the story later on.
  • The reader can select details in the game, such as the girls name or age.
  • A point system can keep track at stuff like how good the reader is at seducing a female. In the end, the score determinates the outcome.

The generated html file will look for the stylesheet hypertext-fiction.css. If you want any special formating create a stylesheet with that name, and place it in the same directory. Be aware that the text of the story is placed inside an old-fashioned html table. Remove the table code if you don't like it. I have created a hypertext-fiction.css which I personally like. Download it here.

If you want to use any HTML codes, just go ahead. They are interpreted just fine. The character " wont work, though.