TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Advenjure – Interactive fiction on the terminal and in the browser

80 pointsby facundo_olanoover 8 years ago

8 comments

m48over 8 years ago
A quick explanation of what this is, because it took me a bit to figure it out: it appears to be an interactive fiction engine written in Clojure. The linked example game is running through ClojureScript in the browser, but the engine also works in the terminal.<p>Here&#x27;s a quick link to the main code file defining the rooms and actions for the example game: <a href="https:&#x2F;&#x2F;github.com&#x2F;facundoolano&#x2F;advenjure-example&#x2F;blob&#x2F;master&#x2F;src&#x2F;example&#x2F;rooms.cljc" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;facundoolano&#x2F;advenjure-example&#x2F;blob&#x2F;maste...</a>. I doubt I&#x27;m the only one that likes looking at this type of example first when looking at an interactive fiction engine, and it may help some people confused by the game.<p>The history of interactive fiction and Lisp is surprisingly intertwined. To the best of my knowledge, all of the original Infocom games were written in ZIL [0], an idiosyncratic Lisp variant that was meant to be a more portable version of the programming language used to write the original mainframe Zork, MDL—which was apparently designed by some of the same people who worked on Scheme and Common Lisp [1].<p>There appears to be an active but still incomplete open source compiler for ZIL written in C# [2], and a few Common Lisp experiments, but not many mature projects combining interactive fiction and Lisp.<p>I hope projects like this one catch on more. I&#x27;ve had trouble grasping other interactive fiction engines, which I often feel are trying to please programmers and writers but hitting an awkward space in between. Lisp&#x27;s &quot;code is data&quot; idea seems like it could be a more graceful way of hitting that balance.<p>[0] <a href="http:&#x2F;&#x2F;www.ifwiki.org&#x2F;index.php&#x2F;ZIL" rel="nofollow">http:&#x2F;&#x2F;www.ifwiki.org&#x2F;index.php&#x2F;ZIL</a><p>[1] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;MDL_(programming_language)" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;MDL_(programming_language)</a><p>[2] <a href="https:&#x2F;&#x2F;bitbucket.org&#x2F;jmcgrew&#x2F;zilf&#x2F;overview" rel="nofollow">https:&#x2F;&#x2F;bitbucket.org&#x2F;jmcgrew&#x2F;zilf&#x2F;overview</a>
评论 #12677589 未加载
PhasmaFelisover 8 years ago
<p><pre><code> There was a small table there. The small table contained: A bottle. The bottle contained a amount of water @Bedroom [0] &gt; get all I didn&#x27;t see that. @Bedroom [1] &gt; get bottle I couldn&#x27;t take that. @Bedroom [2] &gt; take bottle I couldn&#x27;t take that. @Bedroom [3] &gt; drink water I didn&#x27;t know how to do that. @Bedroom [4] &gt; open bottle I couldn&#x27;t open that. </code></pre> I just wanted a drink. :(
评论 #12673533 未加载
评论 #12712415 未加载
评论 #12674622 未加载
qwertyuiop924over 8 years ago
Really neat. I actually wrote something similar but far more primitive in Scheme (worse CL, primitive parser, minimal interactivity, and so on). I wouldn&#x27;t reccomend either system for serious IF, though. Tads, Inform and the rest are far more capable.
gravypodover 8 years ago
I think this implementation isn&#x27;t tackling the root of the problem here. Implementing this as a state machine that can load arbitrary node, status, and links would better model the problem.<p>Good work though on keeping this very simple.
评论 #12675156 未加载
kukxover 8 years ago
Side note: if you are hungry for more interactive fiction, I highly recommend &quot;Lost Pig&quot; by Grunk[0]: <a href="http:&#x2F;&#x2F;iplayif.com&#x2F;?story=http%3A&#x2F;&#x2F;mirror.ifarchive.org&#x2F;if-archive&#x2F;games&#x2F;zcode&#x2F;LostPig.zblorb" rel="nofollow">http:&#x2F;&#x2F;iplayif.com&#x2F;?story=http%3A&#x2F;&#x2F;mirror.ifarchive.org&#x2F;if-a...</a><p>[0] <a href="http:&#x2F;&#x2F;grunk.org&#x2F;lostpig&#x2F;" rel="nofollow">http:&#x2F;&#x2F;grunk.org&#x2F;lostpig&#x2F;</a>
nathellover 8 years ago
Graham Nelson&#x27;s &quot;The Inform Designer&#x27;s Manual, 4th Edition&quot; [DM4] is an essential read for those wishing to implement an interactive fiction authoring system. Especially the chapters on Inform&#x27;s world model and its flexibility.<p>[DM4]: <a href="http:&#x2F;&#x2F;inform-fiction.org&#x2F;manual&#x2F;download_dm4.html" rel="nofollow">http:&#x2F;&#x2F;inform-fiction.org&#x2F;manual&#x2F;download_dm4.html</a>
helloworldover 8 years ago
Does anyone else remember playing Zork?<p><a href="http:&#x2F;&#x2F;mentalfloss.com&#x2F;article&#x2F;29885&#x2F;eaten-grue-brief-history-zork" rel="nofollow">http:&#x2F;&#x2F;mentalfloss.com&#x2F;article&#x2F;29885&#x2F;eaten-grue-brief-histor...</a>
评论 #12675199 未加载
dmitripopovover 8 years ago
Damn these text adventures are addictive...