Show HN: A 'Choose Your Own Adventure' written in Emacs Org Mode (tendollaradventure.com)

155 points by dskhatri ↗ HN
I authored and developed an interactive children's book about entrepreneurship and money management. The journey started with Twinery, the open-source tool for making interactive fiction, discovered right here on HN. The tool kindled memories of reading CYOA style books when I was a kid, and I thought the format would be awesome for writing a story my kids could follow along, incorporating play money to learn about transactions as they occurred in the story.

Twinery is a fantastic tool, and I used it to layout the story map. I really wanted to write the content of the story in Emacs and Org Mode however. Thankfully, Twinery provided the ability to write custom Story Formats that defined how a story was exported. I wrote a Story Format called Twiorg that would export the Twinery file to an Org file and then a Org export backend (ox-twee) to do the reverse. With these tools, I could go back and forth between Emacs and Twinery for authoring the story.

The project snowballed and I ended up with the book in digital and physical book formats. The Web Book is created using another Org export backend.

Ten Dollar Adventure: https://tendollaradventure.com

Sample the Web Book (one complete storyline/adventure): https://tendollaradventure.com/sample/

I couldn't muster the effort to write a special org export backend for the physical books unfortunately and used a commercial editor to format these.

Twiorg: https://github.com/danishec/twiorg

ox-twee: https://github.com/danishec/ox-twee

Previous HN post on writing the transaction logic using an LLM in Emacs: https://blog.tendollaradventure.com/automating-story-logic-w...

Twinery 2: <https://twinery.org/> and discussion on HN: https://news.ycombinator.com/item?id=32788965

13 comments

[ 4.5 ms ] story [ 25.1 ms ] thread
Interesting project!

When I looked into CYOA, I opted for Ink. It's using a nice text-based language, a bit like markdown. It worked well for me, and I think it's a good option if you want to use a text editor.

I wrote about my experiments here: https://laurent.le-brun.eu/blog/my-adventures-with-narrative...

Theoretically, epub format is ideal for a cyoa format book. Each choice at the end of the page can be a hyperlink to the next (internal) file, and the pages/files themselves could be marked non-linear (so that someone can't just page through to see all the pages).

Unfortunately, Apple and the others who have authored epub clients do not implement it correctly and behave as if non-linear pages are supposed to be some sort of footnote, and pop up models to display them, rather than just treating them as the reflowable content that they should be. Not marking them as non-linear is also problematic, because something about it seems off when you can just scrub through pages in linear order. It's unlikely to ever be fixed either, so the format itself is ruined for this purpose.

This is awesome! Thank you for sharing the backstory, and open-sourcing the tools you built. THIS is the kind of thing that keeps me coming back to HN more often than I should.
Ai slop for art, people really need to stop buying these products. Atleast publicize or disclosed you used ai for the art.
Sorry to hijack a bit the thread. I have been using Emacs for the past 20+ years. Before I could live in Emacs, now, I find it harder (software forced on me by external customers, AI tools, ...).

I try everywhere I can to install an Emacs mode for code/text navigation. But they tend to be inconsistent and for some software, it is simply not possible.

Do you have good resources to help there (running Linux/Gnome)? Do you keep the faith or switched "out"?

Thank you for the pointers, I will explore them!
I thought this was going to be a game engine written in Emacs Lisp :) but this is still cool. Congrats!
Do NOT ever use that 4 word description of the genre nor the well know 4 letter acronym. Trademark owner goes VERY AGGRESSIVELY after both. Erase every mention of it everywhere, delete repo and create new one. Replace it with something like

- Interactive Story - Branching Narrative - Pick Your Path - Create Your Own Quest - Personalized Plotline - Dynamic Storytelling

Stop whatever you are doing and do it NOW!

I no longer do game dev but I'm already sweating.

Were the illustrations generated with Twinery? How do you guarantee consistency of the generated characters across multiple drawings?
I'm torn on the use of AI generated images. I want to like them but they are distracting...

Anyway, nice work!