2017 icon indicating copy to clipboard operation
2017 copied to clipboard

Choose Your Own Adventure

Open kili-ilo opened this issue 8 years ago • 12 comments

When I was a kid I really enjoyed those Choose Your Own Adventure books. Ever since learning to program, I've thought about how I could use software to make books, movies, and even music more interactive. For NaNoGenMo, I want to write a program that generates 50k-word Choose Your Own Adventure novels.

kili-ilo avatar Oct 23 '17 22:10 kili-ilo

Last year, as a lurker, I enjoyed browsing other people's work, but this is my first-ever NaNoGenMo. I'm completely open to any advice/feedback/critique on my plan, approach, execution, and final products!

kili-ilo avatar Oct 23 '17 22:10 kili-ilo

This might be aggressive for a first attempt, but here's my initial idea:

Here's an example from a Choose Your Own Adventure (CYOA) book:

Each page has 100-200 words of story, followed by a choice of what to do. Unlike the two pages shown above, some pages will be dead-ends, with no choice at the bottom.

My program will generate 255-page books with 200 words on each page and 128 dead-end pages.

A simple binary tree story structure, with each choice going to exactly 2 unique pages, and story paths through the book taking exactly 8 pages... requires 2^8 - 1 = 255 pages. 255 pages x 200 words/page = 51,000 words

I want to build some sense of continuity into each story path, so that the choices do seem to matter. This could be as simple as adding or removing something from the story after each choice, like meeting a new character or dropping something down a well.

I'm intrigued by the process of generating these story trees and generating the output PDF (I want the pages to actually look like the image above). I'm probably underestimating the difficulty of generating the story text, but I'm ready to learn! 😃

kili-ilo avatar Oct 23 '17 22:10 kili-ilo

A bit off-topic, but I always loved this analysis of the CYOA book series. http://samizdat.cc/cyoa/

greg-kennedy avatar Oct 29 '17 18:10 greg-kennedy

@greg-kennedy Thanks! I love finding that others have already done a lot of the logical work for me.

kili-ilo avatar Oct 31 '17 12:10 kili-ilo

Martin linked me these, too: https://heterogenoustasks.wordpress.com/2015/01/26/standard-patterns-in-choice-based-games/ https://emshort.blog/2016/11/05/small-scale-structures-in-cyoa/

kili-ilo avatar Oct 31 '17 12:10 kili-ilo

I've wanted to do a project like this but haven't gotten to it—glad you're taking it on!

lizadaly avatar Nov 02 '17 16:11 lizadaly

Thanks @lizadaly, I'll let you know how it goes! 😄

kili-ilo avatar Nov 04 '17 03:11 kili-ilo

Here's the repo: https://github.com/JanCVanB/CYOANoGen

kili-ilo avatar Nov 11 '17 09:11 kili-ilo

Here's the live, interactive version: https://jancvanb.github.io/CYOANoGen

kili-ilo avatar Nov 11 '17 09:11 kili-ilo

I've hard-coded an adventure that implements a few simple noun & verb patterns that (with a little on-the-fly Google searching and web scraping to add flavor text and get new nouns & verbs) could take an arbitrary set of inputs and flesh out an adventure by computing sequential states of what you have & where you are.

kili-ilo avatar Nov 11 '17 10:11 kili-ilo

screenshot 2017-11-11 at 11 20 47 am

Perfection.

greg-kennedy avatar Nov 11 '17 17:11 greg-kennedy

Thanks, @greg-kennedy! 😃 I'm excited to make it dynamic and see the endless possibilities unfurl.

kili-ilo avatar Nov 12 '17 03:11 kili-ilo