Show HN: A Persistent AI RPG Engine Built with React SPA and Supabase
Posted by mansueli 3 days ago
Comments
Comment by whitten 3 days ago
Is this tool suitable for any other story system ? It might be a lot of work to extract the Vampire the Masquerade dependency and allow this to be a more generic tool to support stories in a different world but it does seem mansueli has done a lot of useful work here.
Comment by mansueli 3 days ago
It seems that someone flagged my other comment, I am not sure why.
Comment by BizarroLand 2 days ago
I vouched for your comment, hopefully it's ungreyed out for you.
Comment by mansueli 3 days ago
I built Vampiro Life because I was frustrated with generic AI wrappers for tabletop RPGs. LLMs write great atmospheric prose, but they suffer from severe context amnesia—they constantly hallucinate inventory or lose track of mechanics (like "Hunger dice") after a few turns.
I realized that to make a campaign last, the chat transcript cannot be the source of truth.
I decoupled the narrative from the canonical game state using React SPA and Supabase:
State Backbone: Postgres stores character sheets, bounded NPC disposition scores, and world entities. AI output must pass through explicit state transitions (tool calls) to become canon.
Tiered Memory Rollups: To keep retrieval costs bounded, memory is compressed via Edge Functions into tiers (recent -> older -> ancient).
Deterministic NPCs: NPCs don't rely on the LLM "remembering" you. The system persists qualitative relationship edges (e.g., Rival, Sire) to the DB and injects them only when that NPC is in the scene.
I wrote a deep dive on the architecture (including SPA SEO/GEO and Edge image optimization) on my blog: https://blog.mansueli.com/building-a-persistent-ai-game-mast...
I would love for you to poke around the engine, try to push a campaign far enough to break the memory limits, and let me know what you think of the architecture!