Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Choose Your Own Adventure #24

Open
JanCVanB opened this issue Oct 23, 2017 · 12 comments
Open

Choose Your Own Adventure #24

JanCVanB opened this issue Oct 23, 2017 · 12 comments

Comments

@JanCVanB
Copy link

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
Copy link
Author

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
Copy link
Author

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
Copy link

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

@JanCVanB
Copy link
Author

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

@lizadaly
Copy link

lizadaly commented Nov 2, 2017

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

@JanCVanB
Copy link
Author

JanCVanB commented Nov 4, 2017

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

@JanCVanB
Copy link
Author

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

@JanCVanB
Copy link
Author

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

@JanCVanB
Copy link
Author

JanCVanB commented Nov 11, 2017

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
Copy link

screenshot 2017-11-11 at 11 20 47 am

Perfection.

@JanCVanB
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants