Kindle Forum banner

Formatting links for a Choose Your Own Adventure style game?

758 Views 8 Replies 5 Participants Last post by  George Berger
Hi All,

I'm working on a fantasy game I hope to release as a free e-book, and am wondering if there's a way of formatting it so that you have hundreds of links taking you to different sections of the book? I've got the hang of the table of contents, but don't remember reading about how to do this.

The sort of thing I'm writing can be summed up along the lines of "1. You're in a forest. Do you A) Go north [go to 4] B) Fight the three-eyed tentacle monster of doom [go to 453] or C) Go back to sleep [go to 23]" but hopefully a bit better. For another example, the first part of this is here http://redrum-110.deviantart.com/art/Fantasy-113778175.

Anyway, I really hope this is possible, as I've already got through 15,000 words!

Thanks
1 - 9 of 9 Posts
I believe you would have to do html markup within your text to create the links. It sounds harder than it is.
Thanks! I found the standard Word formatting (for chapters and table of contents etc.) wasn't too bad, more like time-consuming but I'm certainly thinking this might be more difficult however it's done...
Yep, HTML anchors.

Code:
...
<p>1. You're in a forest. Do you A) <A href="#4">Go north</a> B) <A href="#453">Fight the three-eyed tentacle monster of doom</a> or C) <A href="#23">Go back to sleep</23></p>


<a id="4"><p>4. You're north of a forest, blah blah blah...</p>


<a id="23"><p>23. You're asleep. Zzzzzzzz.....</p>


<A id="453"><p>453. The three-eyed tentacle monster blah blah blah...</p>
...
See less See more
Great- that seems to sort it all out now. Cheers!
It's not hard.  Write your section pieces and then you need to use the insert bookmark function.  Then use the insert hyperlink and point it to the bookmark to make your "go left" "go right" choices.  Also you will need to code in a "back" link as some devices don't have a back button.  Also this back link can cause problems if you can get to the same page from different choices, so you can't really create loops.  Also remember there are no pages in an ebook because people can change the reading experince, so if they turn the page, it's possible your choices can spread across one page to another and the reader might see the next chapter when they are not supposed to because they are reading in landscape mode and are seeing two pages at once...

Just a few things to consider.
Be careful. It's best to close all HTML tags for valid markup and to prevent nasty gotchas. As well, be consistent in your HTML tag structure. If you start with CAPS (A HREF="#"></A>) then continue the entire document in CAPS.

Additionally, prior to HTML 5, semantics followers would be aghast at you wrapping a href tags around paragraph tags. But it's accepted now.

So, George did the hard work, but I'll be the annoying editor:

Code:
<p>1. You're in a forest. Do you A) <a href="#4">Go north</a> B) <a href="#453">Fight the three-eyed tentacle monster of doom</a> or C) <a href="#23">Go back to sleep</a></p>



<p><a id="4">4. You're north of a forest, blah blah blah...</a></p>


<p><a id="23">23. You're asleep. Zzzzzzzz.....</a></p>


<p><a id="453">453. The three-eyed tentacle monster blah blah blah...</a></p>
Your book idea sounds pretty cool. It's a lot of work, but I can see readers really enjoying your effort. I recently thought of writing a similar game and let authors fill in their questions/answers themselves. Best of luck to you! :D
See less See more
SB: Thanks. There's certainly a lot to consider, and something like this definitely needs a lot of extra time on proofing (a broken link, for example, could ruin the whole thing). I think I can get round the double page problem by ensuring that related sections are kept apart; so you don't get a set of choices and immediately see that one option can kill you, say.

Tracy: Nothing wrong with being an annoying editor- I could have done with more of them! It certainly is a lot of work in terms of keeping options/ links consistent (not to mention the difficulty in introducing elements when the reader can take different paths), but I find that writing text in sections is actually far quicker. And if you do decide to have a go at something like this, I'll be happy to share my experiences  :)
Tracy Leach said:
Additionally, prior to HTML 5, semantics followers would be aghast at you wrapping a href tags around paragraph tags. But it's accepted now.

So, George did the hard work, but I'll be the annoying editor:
Sorry. Everything I know about HTML - true story - I learned by reading the first edition of "The Complete Idiot's Guide to HTML" for a job I had...

...in 1996.

And I've probably forgotten 80% of what I knew, back then. In retrospect, I probably shouldn't be allowed anywhere near a text editor, anymore. :)
1 - 9 of 9 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top