展示HN:我尝试写一部互动小说,结果意外地建立了一个平台

1作者: oldskultxo29 天前原帖
几个月前,我尝试写一部互动小说。<p>结果变成了一个软件项目。<p>随着故事的发展,管理结构变得越来越困难:分支、条件、叙事状态……一切开始变得混乱。<p>在某个时候,我打开了Visual Studio,试图自己解决这个问题。最初的想法很简单:将散文与驱动故事的运行逻辑分开。<p>这个实验慢慢演变成了一个名为iepub的小生态系统:<p>• 一种互动书籍的结构化格式 • 一个解释该格式的阅读器运行时 • 一个专为编写互动小说而设计的可视化编辑器<p>这个编辑器力求让人感觉像一个普通的写作工具(更接近于Google Docs),但专为分支叙事设计。它允许你定义叙事条件,将变量附加到章节,配置概率事件(如掷骰子),创建叙事变体,并将故事的结构可视化为图形。<p>大部分开发工作是在AI代理(Codex)的帮助下进行的,它们充当开发伙伴,这种工作流程在架构、用户界面组件和调试方面出乎意料地有效。<p>如果有人感兴趣:<p>项目: <a href="https:&#x2F;&#x2F;iepub.io" rel="nofollow">https:&#x2F;&#x2F;iepub.io</a><p>关于开发过程的文章: <a href="https:&#x2F;&#x2F;medium.com&#x2F;@santi.santamaria.medel&#x2F;interactive-fiction-platform-codex-ai-093358665827" rel="nofollow">https:&#x2F;&#x2F;medium.com&#x2F;@santi.santamaria.medel&#x2F;interactive-ficti...</a><p>欢迎对项目、架构或AI辅助开发工作流程提出问题。
查看原文
A few months ago I tried to write an interactive fiction novel.<p>It turned into a software project.<p>As the story grew, managing the structure quickly became difficult: branches, conditions, narrative state… everything started getting messy.<p>At some point I opened Visual Studio to try to solve the problem for myself. The initial idea was simple: separate the prose from the runtime logic that drives the story.<p>That experiment slowly turned into a small ecosystem called iepub:<p>• a structured format for interactive books • a reader runtime that interprets that format • and a visual editor designed for writing interactive fiction<p>The editor tries to feel like a normal writing tool (something closer to Google Docs) but designed for branching narrative. It lets you define narrative conditions, attach variables to sections, configure probabilistic events (like dice rolls), create narrative variants, and visualize the structure of the story as a graph.<p>Most of the development ended up happening with AI agents (Codex) acting as development partners, which turned into a surprisingly effective workflow for iterating on architecture, UI components and debugging.<p>If anyone is curious:<p>Project: <a href="https:&#x2F;&#x2F;iepub.io" rel="nofollow">https:&#x2F;&#x2F;iepub.io</a><p>Article about the development process: <a href="https:&#x2F;&#x2F;medium.com&#x2F;@santi.santamaria.medel&#x2F;interactive-fiction-platform-codex-ai-093358665827" rel="nofollow">https:&#x2F;&#x2F;medium.com&#x2F;@santi.santamaria.medel&#x2F;interactive-ficti...</a><p>Happy to answer questions about the project, the architecture, or the AI-assisted development workflow.