[HN Gopher] Show HN: I built an AI that turns any book into a te...
___________________________________________________________________
Show HN: I built an AI that turns any book into a text adventure
game
It's a web app that uses AI to turn any book into a playable text
adventure. Your favorite book, but your choices, hence your story.
You can even "remix" the genre like playing Dune as a noir
detective story. Note: Work in progress. Suggestions are welcome.
Author : rcrKnight
Score : 169 points
Date : 2025-07-29 16:17 UTC (6 hours ago)
(HTM) web link (www.kathaaverse.com)
(TXT) w3m dump (www.kathaaverse.com)
| jahewson wrote:
| This is such a fun concept!
| tantalor wrote:
| Cool! I'm trying with Rendezvous with Rama
|
| https://www.kathaaverse.com/play/custom-Rendezvous%20with%20...
| jetbalsa wrote:
| It did not like Backyard Starship, most likely its not something
| it has in its memory
| freedomben wrote:
| Really cool! I'm guessing the site is getting hammered currently
| cause I hit rate limit on first attempt, but looking forward to
| trying it out later when the hug loosens.
|
| Sorry for the predictable question, but any plans to open source?
| rcrKnight wrote:
| Thanks! About rate limit, you can use your own Gemini API key -
| its stored on your local browser storage only. About open
| source - haven't decided on it yet.
| vagrantJin wrote:
| I was working in an implementation of a vis novel type game for
| my own screenplays and manuscripts. I ended up building a deck
| builder.
| imzadi wrote:
| I like the idea. Looks like it hit a rate limit. Was trying to
| try Dungeon Crawler Carl.
| moconnor wrote:
| Super cool idea! What's your plan for dealing with copyright
| complaints?
| Agingcoder wrote:
| Harry potter Matilda - are you sure there's no legal risk here ?
| ( independently of the coolness of the project)
| ASalazarMX wrote:
| As long as the prompt and Gemini's own training data is all
| they're using, they're safe.
|
| Gemini allows users to create instances (gems) preloaded with a
| document, but I don't think this is doing that, given that it
| (apparently) can use your own API key.
| silentsea90 wrote:
| This is so cool, and slick. Unfortunately, the actual adventure
| part isn't loading so don't know what it feels like
| binarymax wrote:
| Would love to try this, but it seems like you hit a limit. Is
| there a working example you can link to?
| skeptrune wrote:
| This is an awesome concept! The latency makes it a rough UX, but
| the core idea and direction feel right.
| spacecadet wrote:
| Very cool! I recently built a config based AI dungeon
| master/generative game, https://github.com/derekburgess/dungen
| BizarroLand wrote:
| This seems interesting. What plans do you have for it?
| deadbabe wrote:
| This will be amazing with Project Hail Mary!
| peterclary wrote:
| Feels like only a couple of years before AIs can take a movie and
| reconstruct it entirely as an "open world" VR experience.
| AIorNot wrote:
| great idea, but I wonder about copyright and also hitting a rate
| limit
| ASalazarMX wrote:
| There's an easy workaround for the rate limit: click on
| "Advanced" and type your Gemini API key, what could go wrong?
| anthk wrote:
| Don't use copyrighted books. Use Gutenberg for these kind of
| tools.
| CamperBob2 wrote:
| Don't comply in advance. Transformative uses like this are fair
| use until adjudicated otherwise.
| ieuanking wrote:
| This is dopeeeee
| myfear wrote:
| A little less sophisticated, but I've done something similar with
| Langchain4j and Quarkus. Ok, without the books. Just a Dungeon
| Master guiding you. But it's easier than one thinks to build
| stuff like this. https://open.substack.com/pub/myfear/p/ai-
| dungeon-master-qua...
| kmnc wrote:
| How do tools like this avoid what I see in many of these types of
| narrative chat bots: the user becomes the only one steering the
| narrative, and the AI ends up just an obedient responder?
| Whenever I try these things it ends up very predictable, shallow,
| and repetitive, especially as time goes on. And if I have to
| prompt the AI to be creative or act differently... is that really
| acting different?
| catigula wrote:
| Unfortunately this is the fundamental flaw.
|
| I liken it to playing Minecraft on creative mode.
| haolez wrote:
| Anecdote on my side, but Grok 4 was the first model that didn't
| feel like that to me. Maybe my conversations were just not long
| enough for it to fallback to sycophantic behavior.
| thekaranchawla wrote:
| The core problem here to solve is sense of time. You can't
| build good long term experiences without building agentic
| systems that understand time and chat bots that are simple
| wrappers around LLMs are terrible at this because LLMs don't
| have a good sense of time.
| mbowcut2 wrote:
| I've had similar experiences with vanilla ChatGPT as a DM but I
| bet with clever prompt engineering and context window
| management you could solve or at least dramatically improve the
| experience. For example, you could have the model execute a
| planning step before your session in which it generates a plot
| outline, character list, story tree, etc. which could then be
| used for reference during the game session.
|
| One problem that would probably still linger is model
| agreeableness, i.e. despite preparation, models have a tendency
| to say yes to whatever you ask for, and everybody knows a good
| DM needs to know when to say no.
| ianbicking wrote:
| I went to some lengths to ground the action in my game:
| https://ianbicking.org/blog/2025/07/intra-llm-text-adventure
|
| That said, I think there's a lot of prompting techniques that
| can help here. (Actually the Guided Thinking section is an
| example of prompt-only techniques:
| https://ianbicking.org/blog/2025/07/intra-llm-text-
| adventure...)
|
| You must at least do some pre- and post-processing to have the
| LLM consume and generate text that isn't part of the main user
| interface. But given that you can put in guidance that can
| increase the small-scale surprise of the interaction. For
| instance I'll have the LLM write out some of the objective
| environment at the moment before it considers a decision, so
| that it doesn't essentially retcon the setup for a plot
| direction it intends to take.
|
| For the larger arc you'll need something like memory to pull
| the whole thing together. That include repetition over time.
| You can ask the LLM not to repeat itself, and it can do that,
| but only if it understands what it's done. And to some degree
| it needs to understand what it's _doing_: the LLM like the
| player is still generating short turns, and so if it wants to
| create surprise that is revealed over multiple turns then it
| needs space to plan ahead.
| rcfox wrote:
| Back before ChatGPT was publicly available, there was AI
| Dungeon. It was such a yes-man though. You could be in a scene
| with a king and a princess, then write "I eat the demon", and
| it would just invent a demon in the scene, and then describe
| how you unhinge your jaw and gobble it down.
| svachalek wrote:
| I've experimented with this and one approach is to avoid the
| simple chat interface. Let the game be the "user" and have it
| relay the player's text. Something like
|
| <<< We're in this situation, I'm the game master, and the
| player said "xyz". I need your help to handle this request
| according to the rules of the game. >>>
|
| Then the LLM is directing the obedience towards the game master
| and the rules, rather than the player.
| maep wrote:
| Neat, but it has problems following in-universe rules, i.e.
| fantasy novels.
| HellDunkel wrote:
| If art is communication- and i believe it is- why would i want to
| read or listen to anything AI generated? Once you are done with
| consuption there is no point in reflecting on it nor having a
| conversation about it with other fellow humans. People are not
| even interested in each others dreams most of the time. Unless
| the machine is of godlike intelligence there is just zero point.
| csallen wrote:
| You're making a false assumption that other people cannot enjoy
| what you're talking about unless they've experienced it
| themselves. If one has good storytelling skills and a solid
| theory of mind (concern for the listener), almost anything can
| be interesting. Even dreams.
|
| I also disagree with your conclusion that an activity only has
| a point if discussed with others. A good deal of the best
| experiences in my life are things that were for my benefit
| alone, that I never thought to share with anyone else. And I'm
| a pretty social guy.
| HellDunkel wrote:
| I neither made this assumption nor the conclusion.
| sunrunner wrote:
| > Once you are done with consuption there is no point in
| reflecting on it nor having a conversation about it with other
| fellow humans.
|
| If you believe that art is communication (and I do) why
| _wouldn't_ you want to reflect on it or discuss it post
| 'consumption'?
| HellDunkel wrote:
| Because there is no point. If the author is a stochastic
| people machine it is simply not interesting to reflect on it.
| The fact people make artefacts turns them into art. A stone
| is not a work of art without some human doing something with
| it.
|
| You may argue that stones can be interesting without beeing
| works of art. But the generator above takes works of art as
| input and somehow takes the art out if it to some degree.
| spdustin wrote:
| Well done! I've built this same sort of thing for my family to
| play with. My advice for the best results:
|
| 1) Structure the choices offered by the LLM; add "choice_type"
| and add instructions to the LLM on what those choices should do.
| E.g. action, dialogue, investigation, whatever makes sense for
| the genre--the LLM can even generate these at story start--then
| "choice should direct the narrator to focus on an action-oriented
| moment", "choice should direct the narrator to focus on a
| dialogue between two or more characters in the scene", etc.
|
| 2) Use reasoning whenever making tool calls for choices,
| summarize the reasoning, and include it in narrative summaries
| provided as part of the context for future narrative requests.
| For example, the combined summary might be: "In the last
| narrative I wrote for the user, Harry and Luna were startled by
| the noise coming from the edge of the forest. Important scene
| developments: 1) Luna and Harry had been approaching the edge of
| the forbidden forest for the last three narrative turns, and in
| the turn I just wrote they arrived at the edge. 2) Harry seemed
| to be the more courageous of the two in previous narrative turns,
| but in the most recent one, the user's choice resulted in Harry
| becoming more deferential to Luna. 3) In the most recent
| narrative turn, the noise that had been emanating from the forest
| was now accompanied by a flickering light. I then suggested paths
| that would allow for character development through dialogue
| between Harry and Luna (I gave two options here), a path to move
| the story forward by having Harry take Luna's hand before running
| into the forest, and another path that would slow the pace by
| having Luna investigate the flickering light accompanying the
| sound. The user's choice: 'Have Luna investigate the flickering
| light.'
|
| 3) Add an RNG weighted by story length or whatever works for you
| that will result in choices that lead the story to a conclusion.
| Include that direction in the tool call for generating choices,
| along with a countdown to the finale choice.
|
| This is a rough mental sketch of what worked the best for me, i
| purposefully left out implementation or application details, as I
| don't know what you're wanting to do next.
|
| Good luck, looks great!
| NanoWar wrote:
| How do you come up with this? I feel it is quite hard to
| formulate exactly what you want from the LLM in general. Is
| this something you exercised? So good. Or just output from
| another AI, who knows haha
| rcrKnight wrote:
| Great suggestion man, thanks!
| wmil wrote:
| I'm curious what happens if you throw something like Ulysses by
| James Joyce at it.
| ofalkaed wrote:
| It would probably just switch perspective with each chapter. If
| the AI has any real grasp of literary devices something
| metafictional like City of Glass could be interesting but an
| earlier/less complex example of metafiction like Marshlands
| might work better? If my memory serves I think the
| metafictional aspects of Marshlands could translate into this
| even if the AI completely misses the metafiction. Might play
| with this when I have more time.
| syl5x wrote:
| Now this is going to be amazing if we somehow get a structured
| thing for Dungeon Crawler Carl, I would imagine myself as a
| crawler wandering around that would be epic, but this requires a
| lot of options to be made consistent with everything.
|
| Awesome job and idea!
| jaysonelliot wrote:
| It's a pretty cool proof of concept. I did run into some
| weirdness with it right away when trying the Harry Potter book.
| The app kept switching between 2nd and 3rd person for Harry.
|
| The main thing for me, though, was the feeling of emptiness I got
| while playing. I love text adventures, having grown up with
| Infocom games. The thing about them is that you can feel the
| choices made by the writer / programmer, just like you can feel
| the human author behind a book.
|
| I'm sure part of what feels empty to me is because I know it was
| autogenerated. But I feel that even if I was shown this without
| knowing an LLM was behind it, the gameplay wouldn't be as
| rewarding as something written by a human using Inform.
| kqr wrote:
| This is true for me as well. Once you realise that with the
| right prompts you can get the LLM to go off on any tangent you
| want, it starts to ring really hollow. Add to that the
| inability of LLMs to maintain world simulations of any fidelity
| at all, and it becomes difficult to motivate spending time with
| them in that way.
| gabriel666smith wrote:
| This is cool! I've recently been working on a similar project as
| a way to "walk around" in my own writing, understand my
| characters more, etc. I like the three-choice mechanism, with
| free-text, which I also use.
|
| I do feel like, as a reader, I would have to be really desperate
| to "live within" the world of a novel to use it as a narrative
| experience, but I understand that there is definitely a demand /
| desire for that sort of thing, so I hope it hits for people.
|
| I input my own novel's title to see if I could do the same. That
| novel hasn't yet - I believe - been libgenned for "training" by
| the major LLM providers, though its metadata / marketing
| materials exists in the knowledge (released fairly recently,
| announced longer ago). It resulted in a very funny narrative
| beginning in which the main character was the novelist Patricia
| Highsmith, which I think was a name used in the marketing
| materials as a reference point. A very surreal experience.
|
| This is going to be a niche use case, obviously, but what might
| be more common is for users desiring to enter custom narratives
| (though I know some services provide this basic function
| already).
|
| A much more important bug to flag: where the API fails, the "Try
| Again" button doesn't seem to resend my prompt, but literally the
| prompt "Try Again". Here's the text, as I couldn't see a way to
| link to the story (in which I was trying to see how good the
| 'guardrails' are for keeping the story in-universe and reasonable
| - props for it not allowing me to teleport to planets outside of
| the canonical universe).
|
| https://pastebin.com/tjT2zR4R
| why_at wrote:
| From what I've seen, it doesn't seem like AI is very good at
| keeping track of events in a way that makes a logical narrative.
|
| I tried "The Hobbit" and it started with me having tea with
| Gandalf the wizard. There was a knock at the front door so I
| opened it and outside was Gandalf the wizard!
| FredPret wrote:
| Well, he is a wizard
| awkii wrote:
| He is never late, nor is he early. He arrives precisely when
| he means to.
| FredPret wrote:
| It's odd he doesn't pop up unexpectedly in more stories!
| tibbydudeza wrote:
| Seems on point for AI.
| xandrius wrote:
| I wouldn't be surprised if, being Bilbo, Gandalf would troll me
| like that, just to prove a point he's trying to make.
| tonyhart7 wrote:
| of course, it didnt have context lengthy enough for that
|
| I mean human sometimes forgot about the state inside the game
| often
| achierius wrote:
| A context of a few things characters? No, it definitely does.
|
| Beyond that... Would you forget that the guy you were having
| tea with was sitting in your living room? Anyone I know would
| definitely go "how the hell are you outside" not "nice to see
| you today".
| KineticLensman wrote:
| Tolkien himself never really approved of the 'cinematograph' as
| a way of telling stories so I imagine he would really not like
| this
| Zopieux wrote:
| I do not want AI slop games.
|
| The entire point of paying for an (indie) man-made game is the
| care and attention that went into it by passionate developers who
| wanted to convey a story.
|
| The cheap, industrial, soulless output of LLMs is not something I
| care to consume.
| rcrKnight wrote:
| I feel the same about AI vs human-generated content. This is
| more of an experimentation. But the LLM is instructed to be as
| close to the author as possible. Nonetheless the AI wave coming
| everywhere is hard to stop!
| redeyedtreefrog wrote:
| Interesting, I'll take a look when the rate limit issue is
| sorted. There are loads of projects springing up around using
| LLMs for text adventures. My prediction is that at some point
| soon one of them is going to get good enough to gain mainstream
| appeal, but we're not there yet. I suppose Death By AI was a
| breakout AI text hit, but I'm not sure that really counts.
|
| The people behind AI Dungeon have been making AID: Heroes for
| ages, maybe that will turn out to be great when it's finally
| released. There's also Friends and Fables that seems to be making
| rapid progress. And a thousand side projects on GitHub and Steam.
|
| I briefly started my own, hoping to build something more like a
| traditional visual novel choose-your-own adventure with set
| paths, dice rolls, and limited AI elements. However, I soon
| realised that if you show people a large amount of text and only
| occasional user interaction they rapidly check out. The alpha
| version is here for the time being: https://prismaticnoun.xyz but
| I'm unlikely to do any more work on it.
| cactusplant7374 wrote:
| Any plans to add image generation? Basically make it illustrated.
| rcrKnight wrote:
| Yes that's part of the roadmap!
| Karawebnetwork wrote:
| Using non-fiction literature leads to surprisingly interesting
| results.
| SlowTao wrote:
| Time to try "Delphi for dummies!"
|
| "You are Julian Miller, a curious programmer, always eager to
| learn new languages. Delphi has caught your eye, promising
| rapid application development and a visually intuitive
| approach. You're excited to dive in, but first, you need to get
| Delphi installed and running. The first chapter of 'Delphi for
| Dummies' is open in front of you, ready to guide you through
| the process."
| rcrKnight wrote:
| Note that you can use your own Gemini API credentials (Just
| before starting a game, go to 'Advanced options').
|
| Thanks for the suggestions, I'm improving it!
| redeyedtreefrog wrote:
| What security features are in place to ensure nothing is
| capturing or logging user API keys?
| rcrKnight wrote:
| Currently, your API key is stored securely in your browser's
| local session and is never saved on my servers. When you
| close the game, it's gone.
|
| In future, when I add the 'profiles' and ability to save
| games and settings, if users want to save their key, I will
| use encryption.
| DonHopkins wrote:
| Some Chuck Tingle Anthropomorphized Abstract Concept Erotica
| please!
|
| The Last Algorithm: Pounded By The Fake Book That An AI Claimed I
| Wrote And Then The Chicogo Sun-Times Printed As Fact:
|
| https://www.instagram.com/p/DJ7M5XqSQWi/?hl=en
|
| https://www.amazon.com/Last-Algorithm-Pounded-Claimed-Sun-Ti...
|
| When author Andy Mirror wakes up to a furious call from his
| publishing agent, he's not sure what to make of it. Apparently,
| the Chicago Sun-Times has announced a new book that this agent
| was not a part of negotiating. It's called The Last Algorithm.
|
| There's just one problem: The Last Algorithm is not a real Andy
| Mirror book.
|
| Now Andy is struggling to unravel this mystery, headed to The
| Chicago Sun-Times building that is bafflingly empty, save for a
| few machines rolling around. When Andy encounters the physical
| manifestation of this fake book he is shocked, and strangely
| aroused, these feelings culminating in a hardcore pounding that
| will reshape journalism forever.
|
| This erotic tale is 4,200 words of sizzling human on fake AI
| generated book action, including anal, blowjobs, rough sex, and
| The Last Algorithm love.
| mNovak wrote:
| Cool concept!
|
| Ran into a few bugs.. It seems to think I'm in the middle of an
| adventure (the little book icon correctly identifies a character
| and chapter etc) and is prompting for my action, but there's no
| actual story text being displayed. Maybe just a rate limit thing.
|
| Also dark mode immediately crashed the application.
| TSiege wrote:
| People keep downvoting the copyright issue but this is a serious
| problem despite this being a toy app. Are you at risk of being
| sued for using copyrighted material? Is the AI service provider?
|
| Whether or not one likes how current copyright laws exist and
| authors spend a lot of time writing these books and to me this is
| not fan fiction
| anothernewdude wrote:
| All culture should be shared and not stolen by corporate
| interests.
| somethingsome wrote:
| Aaah I wanted to try the infinite napkin, and see what happens
| with maths book, it should be interesting, but I didn't find a
| way to upload the pdf, and I don't have an API key.
___________________________________________________________________
(page generated 2025-07-29 23:00 UTC)