CYOA/MBS - Do It Yourself
Posted: Fri Apr 20, 2007 3:52 am
(mirrored from: Midnight Aurora)
--
So, to do your own version of the Choose Your Own Adventure style story that I did for Love-Love 4/5 you need three things -- an idea, a notepad or something to sketch out story arcs and branches (ah, a use for flowcharting!) and the code.
My code is listed below and is free to use and modify under the terms of the Creative Commons license I released it under. I realize that there are other (and better) ways to do the code (objects and a database would have made much more sense), but due to knowledge and resource limitations I went with JavaScript (which has very poor support for objects).
First, the idea -- generally easy enough to come up with an idea for a story, but it also needs to support places where the story can branch to alternate (not necessarily always good) endings and possibly to support different story arcs or options leading to the same episode. Continuity and canon become a little harder to manage if the arcs mingle. (In the below example, episode 5 is the next day from episode 4, but still the same day if coming in from episdoe 17, thus all reference to previous occurances (the episode 0/intro stuff) could not be refered to as "The fight/girls you saw yestreday")
What I chose was a magical girl story where the protagonist / player character was not yet a girl and the general accepted resolution (for a TF/TG story) is that he ends as part of the team. Of course, there are several ways for a story like that to go, and there are several ways for a player/reader to deviate from the original story concept, allowing for lots of different arcs and endings, a couple "good," many "average," and several "bad."
The simplified plot outline is listed below. When I drew it out on paper, however, rather than merely using numbers I put a brief little blurb of what was supposed to happen there, but to do that in a text document gets a little out of hand
(17 leads into 5, which otherwise follows 4 as well, and 21 leads back to 16 in a loop)
x = ending, either average or bad
+ = good ending
-1 is the "You've reached an ending, but not the good ending"
-2 is the "you've reached a good ending, here's also links to all the other endings"
-3 is the "advanced credits" page which both endings allow you to see
-4 is the "character info" page which would contain spoilers for people not having seen a good ending, plus it is also used as a reward.
-999 is what I used in the code to link to an ep that hadn't been assigned a number yet (for instance, I had the 2-> 15, 16, 17, 18, 19 drawn up while I was working on the lefthand set of arcs and so many of those episodes temporarily linked to -999
-9 technically is not a page number, but a default that is shown for anytime an invalid page number is passed to the code, typically done by someone editing the url and changing the number to get to a different episode.
Episode numbering was changed from draft to final to prevent ease of jumping from what ep to another without following the story.
Code follows in a subsequent post.
--
So, to do your own version of the Choose Your Own Adventure style story that I did for Love-Love 4/5 you need three things -- an idea, a notepad or something to sketch out story arcs and branches (ah, a use for flowcharting!) and the code.
My code is listed below and is free to use and modify under the terms of the Creative Commons license I released it under. I realize that there are other (and better) ways to do the code (objects and a database would have made much more sense), but due to knowledge and resource limitations I went with JavaScript (which has very poor support for objects).
First, the idea -- generally easy enough to come up with an idea for a story, but it also needs to support places where the story can branch to alternate (not necessarily always good) endings and possibly to support different story arcs or options leading to the same episode. Continuity and canon become a little harder to manage if the arcs mingle. (In the below example, episode 5 is the next day from episode 4, but still the same day if coming in from episdoe 17, thus all reference to previous occurances (the episode 0/intro stuff) could not be refered to as "The fight/girls you saw yestreday")
What I chose was a magical girl story where the protagonist / player character was not yet a girl and the general accepted resolution (for a TF/TG story) is that he ends as part of the team. Of course, there are several ways for a story like that to go, and there are several ways for a player/reader to deviate from the original story concept, allowing for lots of different arcs and endings, a couple "good," many "average," and several "bad."
The simplified plot outline is listed below. When I drew it out on paper, however, rather than merely using numbers I put a brief little blurb of what was supposed to happen there, but to do that in a text document gets a little out of hand
- Code: Select all
[introduction]
/ \
1 2 |==================|
/ \ / \ /<-----------\ | |
3 4 15 16---------\ \ | x + |
22 5<---\ x / \ | | | -1 -2 |
x / \ \-----<17 19 18 | | \ / \ |
6 7 / \ | \ | | -3 -4 |
/ \ 40 41 20 21>/ | |
8 9 x 42 / \ | -999 = error |
/ \ / \ / \ 36 37 | -9 = cheat |
/---24 34 23 10 43 44 x | |==================|
/ / \ x x / \ + x / \
25 26 27 11 12 38 39
/ \ | x 14 13 x +
28 29 | x x
x 35 |
x / \
30 31
/ \ x
32 33
+ x
(17 leads into 5, which otherwise follows 4 as well, and 21 leads back to 16 in a loop)
x = ending, either average or bad
+ = good ending
-1 is the "You've reached an ending, but not the good ending"
-2 is the "you've reached a good ending, here's also links to all the other endings"
-3 is the "advanced credits" page which both endings allow you to see
-4 is the "character info" page which would contain spoilers for people not having seen a good ending, plus it is also used as a reward.
-999 is what I used in the code to link to an ep that hadn't been assigned a number yet (for instance, I had the 2-> 15, 16, 17, 18, 19 drawn up while I was working on the lefthand set of arcs and so many of those episodes temporarily linked to -999
-9 technically is not a page number, but a default that is shown for anytime an invalid page number is passed to the code, typically done by someone editing the url and changing the number to get to a different episode.
Episode numbering was changed from draft to final to prevent ease of jumping from what ep to another without following the story.
Code follows in a subsequent post.