Skip to content(if available)orjump to list(if available)

Show HN: A 'Choose Your Own Adventure' written in Emacs Org Mode

Show HN: A 'Choose Your Own Adventure' written in Emacs Org Mode

8 comments

·July 16, 2025

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

laurentlb

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...

dskhatri

Ink looks iteresting! Twinery provides a nice visual editor for the passages and branches which I found appealing. Ultimately, I used Mermaid to create visual snapshots of the story which were useful when editing the physical book.

a_e_k

Neat! IF-wise, there's also

M-x dunnet

which has shipped with GNU Emacs since 1994.

https://en.wikipedia.org/wiki/Dunnet_(video_game)

everybodyknows

Bug report for https://tendollaradventure.com/sample/

Daphne's eyes are brown, except in the supermarket scene, where they're grey.

How were the images produced?

dskhatri

Thanks! The story images were made in Google Whisk. The tool allows you to generate a character and then apply the character to a scene separately defined. While more advanced than other image generation platforms, it isn't perfect and the images required lots of editing in GIMP. The vectors (achievement stickers, play cash) were made in Inkscape.

chrisweekly

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.

dskhatri

Thank you! I have been an Emacs user/consumer for many years. This project finally got me into the proverbial weeds, a fun venture, learning elisp, exploring the Org code base especially around the export backends [1]. It was useful going through the one.el source code as well, and I now write my blog in Emacs, rendering it using this package [2].

[1] https://github.com/emacs-mirror/emacs/blob/master/lisp/org/o... [2] https://github.com/tonyaldon/one.el

babuloseo

Ai slop for art, people really need to stop buying these products. Atleast publicize or disclosed you used ai for the art.