NaNoGenMo / 2017

National Novel Generation Month, 2017 edition.
https://nanogenmo.github.io
186 stars 7 forks source link

Choose Your Own Adventure #24

Open JanCVanB opened 7 years ago

JanCVanB commented 7 years ago

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.

JanCVanB commented 7 years ago

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!

JanCVanB commented 7 years ago

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! ๐Ÿ˜ƒ

greg-kennedy commented 7 years ago

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

JanCVanB commented 7 years ago

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

JanCVanB commented 7 years ago

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/

lizadaly commented 7 years ago

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

JanCVanB commented 7 years ago

Thanks @lizadaly, I'll let you know how it goes! ๐Ÿ˜„

JanCVanB commented 7 years ago

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

JanCVanB commented 7 years ago

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

JanCVanB commented 7 years ago

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.

greg-kennedy commented 7 years ago

screenshot 2017-11-11 at 11 20 47 am

Perfection.

JanCVanB commented 7 years ago

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